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.
This commit is contained in:
Ed Schouten 2016-02-24 10:54:26 +00:00
parent 600d84765f
commit c0af8d16d8

View File

@ -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;