From owner-freebsd-current@FreeBSD.ORG Thu May 4 10:25:55 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0E4C416A400 for ; Thu, 4 May 2006 10:25:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from fw.zoral.com.ua (ll-227.216.82.212.sovam.net.ua [212.82.216.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 064E143D46 for ; Thu, 4 May 2006 10:25:53 +0000 (GMT) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id k44APl1I026488 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 4 May 2006 13:25:47 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.6/8.13.6) with ESMTP id k44APlfv010472 for ; Thu, 4 May 2006 13:25:47 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.6/8.13.6/Submit) id k44APkWL010471 for freebsd-current@freebsd.org; Thu, 4 May 2006 13:25:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 4 May 2006 13:25:46 +0300 From: Kostik Belousov To: freebsd-current@freebsd.org Message-ID: <20060504102546.GC35756@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SkvwRMAIpAhPCcCJ" Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.88.1, clamav-milter version 0.88.1 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on fw.zoral.com.ua Subject: [patch] userquota= syntax in fstab is broken X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 May 2006 10:25:55 -0000 --SkvwRMAIpAhPCcCJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Man page for fstab describes syntax of the form userquota=3D and groupquota=3D that allows to specify alternative quota files. This feature is supported by quota*(8) group of commands, but putting such option into the fstab cause complain from kernel, since this options shall be trimmed from mount option list. Rev. 1.75 of sbin/mount/mount.c does this for userquota/groupquota _without_ "=3D". Patch below fixes the problem for specified syntax as well. Please, apply. Index: sbin/mount/mount.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/local/arch/ncvs/src/sbin/mount/mount.c,v retrieving revision 1.83 diff -u -r1.83 mount.c --- sbin/mount/mount.c 3 Mar 2006 02:46:15 -0000 1.83 +++ sbin/mount/mount.c 4 May 2006 10:24:25 -0000 @@ -120,6 +120,9 @@ 0 }; =20 +static const char userquotaeq[] =3D "userquota=3D"; +static const char groupquotaeq[] =3D "groupquota=3D"; + static int use_mountprog(const char *vfstype) { @@ -634,8 +637,12 @@ continue; } else if (strcmp(p, "userquota") =3D=3D 0) { continue; + } else if (strncmp(p, userquotaeq, sizeof(userquotaeq) - 1) =3D=3D 0) { + continue; } else if (strcmp(p, "groupquota") =3D=3D 0) { continue; + } else if (strncmp(p, groupquotaeq, sizeof(groupquotaeq) - 1) =3D=3D 0)= { + continue; } else if (*p =3D=3D '-') { argv[argc++] =3D p; p =3D strchr(p, '=3D'); --SkvwRMAIpAhPCcCJ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEWdapC3+MBN1Mb4gRApIDAJ4w513arLjw1xCKfe9ZZ9qbETA8TQCffSUI +dajIsyk+y/DQ2eESLZEXdY= =fDgB -----END PGP SIGNATURE----- --SkvwRMAIpAhPCcCJ--