Author: ed
Date: Wed Feb 24 10:54:26 2016
New Revision: 295965
URL: https://svnweb.freebsd.org/changeset/base/295965
Log:
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.
Modified:
head/sys/compat/cloudabi/cloudabi_sock.c
Modified: head/sys/compat/cloudabi/cloudabi_sock.c
==============================================================================
--- head/sys/compat/cloudabi/cloudabi_sock.c Wed Feb 24 08:54:50 2016
(r295964)
+++ head/sys/compat/cloudabi/cloudabi_sock.c Wed Feb 24 10:54:26 2016
(r295965)
@@ -208,7 +208,7 @@ cloudabi_sys_sock_stat_get(struct thread
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;
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"