Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/nfsclient/nfs_clport.c
Show First 20 Lines • Show All 1,241 Lines • ▼ Show 20 Lines | if (uap->flag & NFSSVC_CBADDSOCK) { | ||||
if (error) | if (error) | ||||
return (error); | return (error); | ||||
/* | /* | ||||
* Since we don't know what rights might be required, | * Since we don't know what rights might be required, | ||||
* pretend that we need them all. It is better to be too | * pretend that we need them all. It is better to be too | ||||
* careful than too reckless. | * careful than too reckless. | ||||
*/ | */ | ||||
error = fget(td, nfscbdarg.sock, | error = fget(td, nfscbdarg.sock, | ||||
cap_rights_init(&rights, CAP_SOCK_CLIENT), &fp); | cap_rights_init_one(&rights, CAP_SOCK_CLIENT), &fp); | ||||
if (error) | if (error) | ||||
return (error); | return (error); | ||||
if (fp->f_type != DTYPE_SOCKET) { | if (fp->f_type != DTYPE_SOCKET) { | ||||
fdrop(fp, td); | fdrop(fp, td); | ||||
return (EPERM); | return (EPERM); | ||||
} | } | ||||
error = nfscbd_addsock(fp); | error = nfscbd_addsock(fp); | ||||
fdrop(fp, td); | fdrop(fp, td); | ||||
▲ Show 20 Lines • Show All 162 Lines • Show Last 20 Lines |