aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2007-02-19 13:26:39 +0000
committerRobert Watson <rwatson@FreeBSD.org>2007-02-19 13:26:39 +0000
commite82d0201bd4f03a90bd4f24ff22dca5a5118a5e1 (patch)
treea634e907bb5ce1f599aa62b8768068cf7639d1e9 /sys
parent8bd5639f180e60b47e7840866180b84163737e3e (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_jail.c7
-rw-r--r--sys/ufs/ufs/ufs_quota.c15
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);