diff options
author | dg <dg@FreeBSD.org> | 1995-03-10 22:06:39 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-03-10 22:06:39 +0000 |
commit | b017660c3ee10633cc54da726d1f6911ae346b08 (patch) | |
tree | 0fcb79a63cd9447b5c14e17eda42a9fbc58b9fa2 /sys/ufs | |
parent | 4e060d19417815a661bda8ccaa092ba9f960b504 (diff) | |
download | FreeBSD-src-b017660c3ee10633cc54da726d1f6911ae346b08.zip FreeBSD-src-b017660c3ee10633cc54da726d1f6911ae346b08.tar.gz |
Patch to fix quota panic from Mike Karels:
allow Q_SYNC regardless of "target" uid, we allow it with -1;
fix bug that caused all ops to refer to user quotas, not group.
Submitted by: Mike Karels
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ufs/ufs_vfsops.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/ufs/ufs/ufs_vfsops.c b/sys/ufs/ufs/ufs_vfsops.c index c7adf84..950f386 100644 --- a/sys/ufs/ufs/ufs_vfsops.c +++ b/sys/ufs/ufs/ufs_vfsops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)ufs_vfsops.c 8.4 (Berkeley) 4/16/94 - * $Id: ufs_vfsops.c,v 1.2 1994/08/02 07:55:01 davidg Exp $ + * $Id: ufs_vfsops.c,v 1.3 1994/10/08 06:57:28 phk Exp $ */ #include <sys/param.h> @@ -113,8 +113,9 @@ ufs_quotactl(mp, cmds, uid, arg, p) cmd = cmds >> SUBCMDSHIFT; switch (cmd) { - case Q_GETQUOTA: case Q_SYNC: + break; + case Q_GETQUOTA: if (uid == p->p_cred->p_ruid) break; /* fall through */ @@ -123,7 +124,7 @@ ufs_quotactl(mp, cmds, uid, arg, p) return (error); } - type = cmd & SUBCMDMASK; + type = cmds & SUBCMDMASK; if ((u_int)type >= MAXQUOTAS) return (EINVAL); |