diff options
| author | Colin Percival <cperciva@FreeBSD.org> | 2004-07-26 07:24:04 +0000 |
|---|---|---|
| committer | Colin Percival <cperciva@FreeBSD.org> | 2004-07-26 07:24:04 +0000 |
| commit | 56f21b9d74a516a6c2f67d09e1b6c588bfa54c6a (patch) | |
| tree | e24e86995427678a1313e8f62cc17f84bdcaf82b /sys/gnu | |
| parent | 726dc81dee1abe2bcaae749a9680a4693a4b451f (diff) | |
Notes
Diffstat (limited to 'sys/gnu')
| -rw-r--r-- | sys/gnu/ext2fs/ext2_vnops.c | 10 | ||||
| -rw-r--r-- | sys/gnu/fs/ext2fs/ext2_vnops.c | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/sys/gnu/ext2fs/ext2_vnops.c b/sys/gnu/ext2fs/ext2_vnops.c index 192d5103ac06..396463219437 100644 --- a/sys/gnu/ext2fs/ext2_vnops.c +++ b/sys/gnu/ext2fs/ext2_vnops.c @@ -480,7 +480,7 @@ ext2_setattr(ap) * Privileged non-jail processes may not modify system flags * if securelevel > 0 and any existing system flags are set. */ - if (!suser_cred(cred, PRISON_ROOT)) { + if (!suser_cred(cred, SUSER_ALLOWJAIL)) { if (ip->i_flags & (SF_NOUNLINK | SF_IMMUTABLE | SF_APPEND)) { error = securelevel_gt(cred, 0); @@ -599,7 +599,7 @@ ext2_chmod(vp, mode, cred, td) * as well as set the setgid bit on a file with a group that the * process is not a member of. */ - if (suser_cred(cred, PRISON_ROOT)) { + if (suser_cred(cred, SUSER_ALLOWJAIL)) { if (vp->v_type != VDIR && (mode & S_ISTXT)) return (EFTYPE); if (!groupmember(ip->i_gid, cred) && (mode & ISGID)) @@ -645,14 +645,14 @@ ext2_chown(vp, uid, gid, cred, td) */ if ((uid != ip->i_uid || (gid != ip->i_gid && !groupmember(gid, cred))) && - (error = suser_cred(cred, PRISON_ROOT))) + (error = suser_cred(cred, SUSER_ALLOWJAIL))) return (error); ogid = ip->i_gid; ouid = ip->i_uid; ip->i_gid = gid; ip->i_uid = uid; ip->i_flag |= IN_CHANGE; - if (suser_cred(cred, PRISON_ROOT) && (ouid != uid || ogid != gid)) + if (suser_cred(cred, SUSER_ALLOWJAIL) && (ouid != uid || ogid != gid)) ip->i_mode &= ~(ISUID | ISGID); return (0); } @@ -1829,7 +1829,7 @@ ext2_makeinode(mode, dvp, vpp, cnp) tvp->v_type = IFTOVT(mode); /* Rest init'd in getnewvnode(). */ ip->i_nlink = 1; if ((ip->i_mode & ISGID) && !groupmember(ip->i_gid, cnp->cn_cred) && - suser_cred(cnp->cn_cred, PRISON_ROOT)) + suser_cred(cnp->cn_cred, SUSER_ALLOWJAIL)) ip->i_mode &= ~ISGID; if (cnp->cn_flags & ISWHITEOUT) diff --git a/sys/gnu/fs/ext2fs/ext2_vnops.c b/sys/gnu/fs/ext2fs/ext2_vnops.c index 192d5103ac06..396463219437 100644 --- a/sys/gnu/fs/ext2fs/ext2_vnops.c +++ b/sys/gnu/fs/ext2fs/ext2_vnops.c @@ -480,7 +480,7 @@ ext2_setattr(ap) * Privileged non-jail processes may not modify system flags * if securelevel > 0 and any existing system flags are set. */ - if (!suser_cred(cred, PRISON_ROOT)) { + if (!suser_cred(cred, SUSER_ALLOWJAIL)) { if (ip->i_flags & (SF_NOUNLINK | SF_IMMUTABLE | SF_APPEND)) { error = securelevel_gt(cred, 0); @@ -599,7 +599,7 @@ ext2_chmod(vp, mode, cred, td) * as well as set the setgid bit on a file with a group that the * process is not a member of. */ - if (suser_cred(cred, PRISON_ROOT)) { + if (suser_cred(cred, SUSER_ALLOWJAIL)) { if (vp->v_type != VDIR && (mode & S_ISTXT)) return (EFTYPE); if (!groupmember(ip->i_gid, cred) && (mode & ISGID)) @@ -645,14 +645,14 @@ ext2_chown(vp, uid, gid, cred, td) */ if ((uid != ip->i_uid || (gid != ip->i_gid && !groupmember(gid, cred))) && - (error = suser_cred(cred, PRISON_ROOT))) + (error = suser_cred(cred, SUSER_ALLOWJAIL))) return (error); ogid = ip->i_gid; ouid = ip->i_uid; ip->i_gid = gid; ip->i_uid = uid; ip->i_flag |= IN_CHANGE; - if (suser_cred(cred, PRISON_ROOT) && (ouid != uid || ogid != gid)) + if (suser_cred(cred, SUSER_ALLOWJAIL) && (ouid != uid || ogid != gid)) ip->i_mode &= ~(ISUID | ISGID); return (0); } @@ -1829,7 +1829,7 @@ ext2_makeinode(mode, dvp, vpp, cnp) tvp->v_type = IFTOVT(mode); /* Rest init'd in getnewvnode(). */ ip->i_nlink = 1; if ((ip->i_mode & ISGID) && !groupmember(ip->i_gid, cnp->cn_cred) && - suser_cred(cnp->cn_cred, PRISON_ROOT)) + suser_cred(cnp->cn_cred, SUSER_ALLOWJAIL)) ip->i_mode &= ~ISGID; if (cnp->cn_flags & ISWHITEOUT) |
