diff options
Diffstat (limited to 'sys/netinet6/sctp6_usrreq.c')
-rw-r--r-- | sys/netinet6/sctp6_usrreq.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/netinet6/sctp6_usrreq.c b/sys/netinet6/sctp6_usrreq.c index 39d531b..3483658 100644 --- a/sys/netinet6/sctp6_usrreq.c +++ b/sys/netinet6/sctp6_usrreq.c @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include <sys/stat.h> #include <sys/systm.h> #include <sys/syslog.h> +#include <sys/priv.h> #include <sys/proc.h> #include <net/if.h> #include <net/route.h> @@ -481,7 +482,13 @@ sctp6_getcred(SYSCTL_HANDLER_ARGS) struct sctp_tcb *stcb; int error, s; - error = suser(req->td); + /* + * XXXRW: Other instances of getcred use SUSER_ALLOWJAIL, as socket + * visibility is scoped using cr_canseesocket(), which it is not + * here. + */ + error = priv_check_cred(req->td->td_ucred, PRIV_NETINET_RESERVEDPORT, + 0); if (error) return (error); |