Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/fdescfs/fdesc_vnops.c
Show First 20 Lines • Show All 490 Lines • ▼ Show 20 Lines | if (VTOFDESC(ap->a_vp)->fd_type == Froot) | ||||
return (EACCES); | return (EACCES); | ||||
fd = VTOFDESC(ap->a_vp)->fd_fd; | fd = VTOFDESC(ap->a_vp)->fd_fd; | ||||
/* | /* | ||||
* Allow setattr where there is an underlying vnode. | * Allow setattr where there is an underlying vnode. | ||||
*/ | */ | ||||
error = getvnode(td, fd, | error = getvnode(td, fd, | ||||
cap_rights_init(&rights, CAP_EXTATTR_SET), &fp); | cap_rights_init_one(&rights, CAP_EXTATTR_SET), &fp); | ||||
if (error) { | if (error) { | ||||
/* | /* | ||||
* getvnode() returns EINVAL if the file descriptor is not | * getvnode() returns EINVAL if the file descriptor is not | ||||
* backed by a vnode. Silently drop all changes except | * backed by a vnode. Silently drop all changes except | ||||
* chflags(2) in this case. | * chflags(2) in this case. | ||||
*/ | */ | ||||
if (error == EINVAL) { | if (error == EINVAL) { | ||||
if (vap->va_flags != VNOVAL) | if (vap->va_flags != VNOVAL) | ||||
▲ Show 20 Lines • Show All 153 Lines • Show Last 20 Lines |