summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2016-02-24 10:54:26 +0000
committered <ed@FreeBSD.org>2016-02-24 10:54:26 +0000
commitdc97d79aa1b995ca262173d57b237b3cd481b8a4 (patch)
treeebd120ce4393774c3b88fab1905288b66db2da52
parente015c6acdca331874c7639de84d171a0b237f127 (diff)
downloadFreeBSD-src-dc97d79aa1b995ca262173d57b237b3cd481b8a4.zip
FreeBSD-src-dc97d79aa1b995ca262173d57b237b3cd481b8a4.tar.gz
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.
-rw-r--r--sys/compat/cloudabi/cloudabi_sock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/compat/cloudabi/cloudabi_sock.c b/sys/compat/cloudabi/cloudabi_sock.c
index 3aefab1..cdccdff 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;
OpenPOWER on IntegriCloud