NetBSD Problem Report #299
From gnats Tue Jun 21 03:05:25 1994
Received: from goanna.cs.rmit.oz.au (root@goanna.cs.rmit.OZ.AU [131.170.24.40]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id DAA15073 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Tue, 21 Jun 1994 03:05:22 -0700
Message-Id: <199406210959.TAA00235@karybdis.cs.rmit.OZ.AU>
Date: Tue, 21 Jun 1994 19:59:13 +1000
From: Luke Mewburn <lm@karybdis.cs.rmit.OZ.AU>
Reply-To: lm@rmit.edu.au
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: mount(1) barfs on quota options
X-Send-Pr-Version: 3.2
>Number: 299
>Category: bin
>Synopsis: mount(1) can't handle quota options in /etc/fstab
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: gnats-admin
>State: closed
>Class: sw-bug
>Submitter-Id: lm
>Arrival-Date: Tue Jun 21 03:20:04 +0000 1994
>Closed-Date: Fri Jul 08 18:56:18 +0000 1994
>Last-Modified:
>Originator: Luke Mewburn
>Release:
>Organization:
Technical Services Group, Department of Computer Science, RMIT
>Environment:
System: NetBSD karybdis 0.9C NetBSD 0.9C (KARYBDIS) #1: Sat Jun 18 18:35:26 EST 1994 root@karybdis:/Src/src/sys/arch/i386/compile/KARYBDIS i386
>Description:
if you have an entry in /etc/fstab for a filesystem with a userquota
or groupquota option, mount complains with
`mount -o userquota: option not supported'
or something similar.
>How-To-Repeat:
put `userquota' as an option for an fs in the fstab. E.g.:
/dev/wd0g /home ufs rw,userquota 1 2
unmount the fs (umount /home)
mount /home
(barfola time)
If you don't have the userquota option in /etc/fstab, then quotaon -a &
quotacheck -a won't function correctly.
>Fix:
A bit of a hack. I just changed mount so that `userquota' and
`groupquota' (along with `rw') never get passed as a -o option to a
child. I use strncmp because userquota/groupquota may be followed by
an `=some/file', so this ensures that the compare works.
Apply this patch.
*** sbin/mount/mount.c.PLM Tue Jun 21 19:31:08 1994
--- sbin/mount/mount.c Tue Jun 21 19:39:40 1994
***************
*** 508,514 ****
*p = '\0';
argv[argc++] = p+1;
}
! } else if (strcmp(p, "rw") != 0) {
argv[argc++] = "-o";
argv[argc++] = p;
}
--- 508,516 ----
*p = '\0';
argv[argc++] = p+1;
}
! } else if ( (strcmp(p, "rw") != 0) &&
! (strncmp(p, "userquota", 9) != 0) &&
! (strncmp(p, "groupquota", 10) != 0) ) {
argv[argc++] = "-o";
argv[argc++] = p;
}
[Hmm... I wonder how quotas worked for 4.4-lite - since I had a look
at that code and it seems to exhibit the same problem. ;]
Luke.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: mycroft
State-Changed-When: Fri Jul 8 11:56:18 PDT 1994
State-Changed-Why:
This was fixed a while ago.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.