diff options
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/kern/kern_jail.c | 7 | ||||
| -rw-r--r-- | sys/ufs/ufs/ufs_quota.c | 15 |
2 files changed, 5 insertions, 17 deletions
diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index d6e65fa216af..8495fb95a763 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -618,14 +618,11 @@ prison_priv_check(struct ucred *cred, int priv) /* * Allow root in jail to manage a variety of quota - * properties. Some are a bit surprising and should be - * reconsidered. + * properties. These should likely be conditional on a + * configuration option. */ case PRIV_UFS_GETQUOTA: - case PRIV_UFS_QUOTAOFF: /* XXXRW: Slightly surprising. */ - case PRIV_UFS_QUOTAON: /* XXXRW: Slightly surprising. */ case PRIV_UFS_SETQUOTA: - case PRIV_UFS_SETUSE: /* XXXRW: Slightly surprising. */ /* * Since Jail relies on chroot() to implement file system diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c index 194c013c3c9d..55e91b97cfca 100644 --- a/sys/ufs/ufs/ufs_quota.c +++ b/sys/ufs/ufs/ufs_quota.c @@ -451,11 +451,7 @@ quotaon(td, mp, type, fname) int error, flags; struct nameidata nd; - /* - * XXXRW: Can this be right? Jail is allowed to do this? - */ - error = priv_check_cred(td->td_ucred, PRIV_UFS_QUOTAON, - SUSER_ALLOWJAIL); + error = priv_check_cred(td->td_ucred, PRIV_UFS_QUOTAON, 0); if (error) return (error); @@ -550,11 +546,7 @@ quotaoff(td, mp, type) struct inode *ip; int error; - /* - * XXXRW: This also seems wrong to allow in a jail? - */ - error = priv_check_cred(td->td_ucred, PRIV_UFS_QUOTAOFF, - SUSER_ALLOWJAIL); + error = priv_check_cred(td->td_ucred, PRIV_UFS_QUOTAOFF, 0); if (error) return (error); @@ -741,8 +733,7 @@ setuse(td, mp, id, type, addr) struct dqblk usage; int error; - error = priv_check_cred(td->td_ucred, PRIV_UFS_SETUSE, - SUSER_ALLOWJAIL); + error = priv_check_cred(td->td_ucred, PRIV_UFS_SETUSE, 0); if (error) return (error); |
