From c0af8d16d8498fb71da0e937902a8c428cb2cd47 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Wed, 24 Feb 2016 10:54:26 +0000 Subject: [PATCH] Call cap_rights_init() properly. Even though or'ing the individual rights works in this specific case, it may not work in general. Pass them in as varargs. --- sys/compat/cloudabi/cloudabi_sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/cloudabi/cloudabi_sock.c b/sys/compat/cloudabi/cloudabi_sock.c index 3aefab108dee..cdccdffcf3d5 100644 --- a/sys/compat/cloudabi/cloudabi_sock.c +++ b/sys/compat/cloudabi/cloudabi_sock.c @@ -208,7 +208,7 @@ cloudabi_sys_sock_stat_get(struct thread *td, int error; error = getsock_cap(td, uap->fd, cap_rights_init(&rights, - CAP_GETSOCKOPT | CAP_GETPEERNAME | CAP_GETSOCKNAME), &fp, NULL); + CAP_GETSOCKOPT, CAP_GETPEERNAME, CAP_GETSOCKNAME), &fp, NULL); if (error != 0) return (error); so = fp->f_data;