diff options
author | pjd <pjd@FreeBSD.org> | 2007-03-01 20:47:42 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2007-03-01 20:47:42 +0000 |
commit | e544923453d6840a7a70fa2b14eda020d03ff11e (patch) | |
tree | f8078bd189d70d3c1b40fe6730dd81a20260b0de /sys/ufs | |
parent | 9558665f1e9f1f9706571aaa461046ce5b51544e (diff) | |
download | FreeBSD-src-e544923453d6840a7a70fa2b14eda020d03ff11e.zip FreeBSD-src-e544923453d6840a7a70fa2b14eda020d03ff11e.tar.gz |
Rename PRIV_VFS_CLEARSUGID to PRIV_VFS_RETAINSUGID, which seems to better
describe the privilege.
OK'ed by: rwatson
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_vnops.c | 4 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_vnops.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 2a6ce6b..b25c1df 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -790,7 +790,7 @@ ffs_write(ap) */ if ((ip->i_mode & (ISUID | ISGID)) && resid > uio->uio_resid && ap->a_cred) { - if (priv_check_cred(ap->a_cred, PRIV_VFS_CLEARSUGID, + if (priv_check_cred(ap->a_cred, PRIV_VFS_RETAINSUGID, SUSER_ALLOWJAIL)) { ip->i_mode &= ~(ISUID | ISGID); DIP_SET(ip, i_mode, ip->i_mode); @@ -1118,7 +1118,7 @@ ffs_extwrite(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *ucred) * tampering. */ if ((ip->i_mode & (ISUID | ISGID)) && resid > uio->uio_resid && ucred) { - if (priv_check_cred(ap->a_cred, PRIV_VFS_CLEARSUGID, + if (priv_check_cred(ap->a_cred, PRIV_VFS_RETAINSUGID, SUSER_ALLOWJAIL)) { ip->i_mode &= ~(ISUID | ISGID); dp->di_mode = ip->i_mode; diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 8ea9ab9..2f5ecd0 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -787,7 +787,8 @@ good: #endif /* QUOTA */ ip->i_flag |= IN_CHANGE; if ((ip->i_mode & (ISUID | ISGID)) && (ouid != uid || ogid != gid)) { - if (priv_check_cred(cred, PRIV_VFS_CLEARSUGID, SUSER_ALLOWJAIL)) { + if (priv_check_cred(cred, PRIV_VFS_RETAINSUGID, + SUSER_ALLOWJAIL)) { ip->i_mode &= ~(ISUID | ISGID); DIP_SET(ip, i_mode, ip->i_mode); } |