Description of Problem: with quota-3.01pre9-0.7.1 many components doesn't work since the quota tools doesn't recognize that 2.4.2-2 uses newstyle quota files. The following patch is a fix to that problem. --- quota-tools-rh/quotasys.c Thu Sep 20 14:13:31 2001 +++ quota-tools-rh-work/quotasys.c Thu Sep 20 13:33:32 2001 @@ -467,8 +467,30 @@ if (quotactl(QCMD(Q_GETSTATS, 0), NULL, 0, (void *)&stats) < 0) { if (errno == ENOSYS || errno == ENOTSUP) /* Quota not compiled? */ return QF_ERROR; - if (errno == EINVAL || errno == EFAULT || errno == EPERM) /* Old quota compiled? */ - return ret | (1 << QF_VFSOLD); + if (errno == EINVAL || errno == EFAULT || errno == EPERM) { /* Old quota compiled? */ + // RedHat 7.1 (2.4.2-2) newquota check + // Q_GETSTATS in it's old place, Q_GETQUOTA in the new place + // (they haven't moved Q_GETSTATS to its new value) + int err_stat = 0; + int err_quota = 0; + char tmp[1024]; /* Just temporary buffer */ + + if (quotactl(QCMD(Q_V1_GETSTATS, 0), NULL, 0, (void *)& stats)) { + err_stat = errno; + } + if (quotactl(QCMD(Q_V1_GETQUOTA, 0), "", 0, tmp)) { + err_quota = errno; + } + + // On a RedHat 2.4.2-2 we expect 0, EINVAL + // On a 2.4.x we expect 0, ENOENT + // On a 2.4.x-ac we wont get here + if (err_stat == 0 && err_quota == EINVAL) { + return ret | (1 << QF_VFSV0); /* New format supported */ + } else { + return ret | (1 << QF_VFSOLD); + } + } die(4, _("Error while detecting kernel quota version: %s\ n"), strerror(errno)); } /* We might do some more generic checks in future but this should be enough for now */
I can verify this problem (with a hand-build kernel 2.4.9): some of the quota tools work if one specifies -F vfsv0 (for version 2 aquota files), but some (e.g. and most importantly quotaon) don't support that option. Can someone please put this patch into an RPM and release it as an update? I don't want to have to build by own quota tools, and surely a totally non-functional quota package is a bad enough bug to warrant an update!
Patched rpms are here ftp://operator.burst.net/sysup/7.1/quota/
*** Bug 54475 has been marked as a duplicate of this bug. ***
Could you have a shot with using the quota-3.06-2 package thats in rawhide please (I don't have a <7.3 system to hand to verify this) and tell me if this problem still persists ftp://ftp.redhat.com/pub/redhat/linux/rawhide/SRPMS/SRPMS/quota-3.06-2.src.rpm ftp://ftp.redhat.com/pub/redhat/linux/rawhide/i386/RedHat/RPMS/quota-3.06-2.i386.rpm Thanks Phil =--=
No activity Closing