Synopsis:       DUID in fstab(5) breaks quota(1) reporting
Category:       system
Environment:

        System      : OpenBSD 5.2
        Details     : OpenBSD 5.2 (GENERIC.MP) #368: Wed Aug  1 10:04:49 MDT 
2012
                         
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP

        Architecture: OpenBSD.amd64
        Machine     : amd64

Description:

        If DUIDs are uses in fstab(5) (as it is default now), quota(5)
        will report none information at all.

How-To-Repeat:

        Setup user quota as described in FAQ 10.11
        Run quota. It will print "none" in all circumstances for all users.

Fix:

        Use getfsfile(3) istead of getfsspec(3) to lookup fstab entries.

--- /usr/src/usr.bin/quota/quota.c.orig Sat Feb 23 00:06:15 2013
+++ /usr/src/usr.bin/quota/quota.c      Sat Feb 23 00:06:38 2013
@@ -462,7 +462,7 @@
                         * on a filesystem independent of /etc/fstab, and it
                         * will still print quotas for them.
                         */
-                       if ((fs = getfsspec(fst[i].f_mntfromname)) == NULL)
+                       if ((fs = getfsfile(fst[i].f_mntonname)) == NULL)
                                continue;
                        if (getufsquota(&fst[i], fs, qup, id, quotatype) == 0)
                                continue;

Reply via email to