Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/sctp_syscalls.c
| Show First 20 Lines • Show All 242 Lines • ▼ Show 20 Lines | if (uap->tolen != 0) { | ||||
| if (error != 0) { | if (error != 0) { | ||||
| to = NULL; | to = NULL; | ||||
| goto sctp_bad2; | goto sctp_bad2; | ||||
| } | } | ||||
| cap_rights_set(&rights, CAP_CONNECT); | cap_rights_set(&rights, CAP_CONNECT); | ||||
| } | } | ||||
| AUDIT_ARG_FD(uap->sd); | AUDIT_ARG_FD(uap->sd); | ||||
| error = getsock_cap(td, uap->sd, &rights, &fp, NULL); | error = getsock_cap(td, uap->sd, &rights, &fp, NULL, NULL); | ||||
| if (error != 0) | if (error != 0) | ||||
| goto sctp_bad; | goto sctp_bad; | ||||
| #ifdef KTRACE | #ifdef KTRACE | ||||
| if (to && (KTRPOINT(td, KTR_STRUCT))) | if (to && (KTRPOINT(td, KTR_STRUCT))) | ||||
| ktrsockaddr(to); | ktrsockaddr(to); | ||||
| #endif | #endif | ||||
| iov[0].iov_base = uap->msg; | iov[0].iov_base = uap->msg; | ||||
| ▲ Show 20 Lines • Show All 96 Lines • ▼ Show 20 Lines | if (uap->tolen != 0) { | ||||
| if (error != 0) { | if (error != 0) { | ||||
| to = NULL; | to = NULL; | ||||
| goto sctp_bad2; | goto sctp_bad2; | ||||
| } | } | ||||
| cap_rights_set(&rights, CAP_CONNECT); | cap_rights_set(&rights, CAP_CONNECT); | ||||
| } | } | ||||
| AUDIT_ARG_FD(uap->sd); | AUDIT_ARG_FD(uap->sd); | ||||
| error = getsock_cap(td, uap->sd, &rights, &fp, NULL); | error = getsock_cap(td, uap->sd, &rights, &fp, NULL, NULL); | ||||
| if (error != 0) | if (error != 0) | ||||
| goto sctp_bad1; | goto sctp_bad1; | ||||
| #ifdef COMPAT_FREEBSD32 | #ifdef COMPAT_FREEBSD32 | ||||
| if (SV_CURPROC_FLAG(SV_ILP32)) | if (SV_CURPROC_FLAG(SV_ILP32)) | ||||
| error = freebsd32_copyiniov((struct iovec32 *)uap->iov, | error = freebsd32_copyiniov((struct iovec32 *)uap->iov, | ||||
| uap->iovlen, &iov, EMSGSIZE); | uap->iovlen, &iov, EMSGSIZE); | ||||
| else | else | ||||
| ▲ Show 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | |||||
| #ifdef KTRACE | #ifdef KTRACE | ||||
| struct uio *ktruio = NULL; | struct uio *ktruio = NULL; | ||||
| #endif | #endif | ||||
| ssize_t len; | ssize_t len; | ||||
| int error, fromlen, i, msg_flags; | int error, fromlen, i, msg_flags; | ||||
| AUDIT_ARG_FD(uap->sd); | AUDIT_ARG_FD(uap->sd); | ||||
| error = getsock_cap(td, uap->sd, cap_rights_init(&rights, CAP_RECV), | error = getsock_cap(td, uap->sd, cap_rights_init(&rights, CAP_RECV), | ||||
| &fp, NULL); | &fp, NULL, NULL); | ||||
| if (error != 0) | if (error != 0) | ||||
| return (error); | return (error); | ||||
| #ifdef COMPAT_FREEBSD32 | #ifdef COMPAT_FREEBSD32 | ||||
| if (SV_CURPROC_FLAG(SV_ILP32)) | if (SV_CURPROC_FLAG(SV_ILP32)) | ||||
| error = freebsd32_copyiniov((struct iovec32 *)uap->iov, | error = freebsd32_copyiniov((struct iovec32 *)uap->iov, | ||||
| uap->iovlen, &iov, EMSGSIZE); | uap->iovlen, &iov, EMSGSIZE); | ||||
| else | else | ||||
| #endif | #endif | ||||
| ▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines | |||||