summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjkar8572 <jkar8572>2003-06-12 21:36:03 +0000
committerjkar8572 <jkar8572>2003-06-12 21:36:03 +0000
commitb91f26486e94785bc559922031a1d8926f2af686 (patch)
tree28450af93a9d79ce7807e1fdd128d2374f2e8ba4
parentc147aff8c4aa5dc40be9e7c365ec8e01479dba95 (diff)
* minor update of quota(1) manpage (Jan Kara)
* yet one more fix of autofs handling, fixed bug introduced by previous autofs patches (Paul Szabo, Jan Kara)
-rw-r--r--Changelog3
-rw-r--r--quota.14
-rw-r--r--quotasys.c26
3 files changed, 24 insertions, 9 deletions
diff --git a/Changelog b/Changelog
index ee6e3de..ab9271a 100644
--- a/Changelog
+++ b/Changelog
@@ -1,11 +1,12 @@
Changes in quota-tools from 3.08 to 3.09
+* minor update of quota(1) manpage (Jan Kara)
* quotacheck(8) now remembers only hardlinked files and not all inodes with
n_link > 1 (Jan Kara, Jan Kasprzak)
* quotacheck(8) doesn't store structures for all users in old quota format (Jan Kasprzak)
* fixed minor bug in documentation (Jan Kara, Lucas Brasilino)
* repquota(8) handles multiple entries in /etc/passwd better (Jan Kara)
* made tools not to touch mountpoints mounted without quota options (Jan Kara)
-* added option for ignoring autofs mountpoints to quota(1), quot(8) and repquota(8) (Jan Kara, Paul Szabo)
+* added option for ignoring autofs mountpoints to quota(1), quot(8), repquota(8) and rpc.rquotad(8) (Jan Kara, Paul Szabo)
* updated xqmstats (Nathan Scott)
Changes in quota-tools from 3.07 to 3.08
diff --git a/quota.1 b/quota.1
index e10d62c..ca5a245 100644
--- a/quota.1
+++ b/quota.1
@@ -81,6 +81,10 @@ report quotas only on local filesystems (ie. ignore NFS mounted filesystems).
Print a more terse message,
containing only information
on filesystems where usage is over quota.
+.TP
+.B \-Q
+Do not print error message if connection to rpc.rquotad is refused (usually this happens
+when rpc.rquotad is not running on the server).
.LP
Specifying both
.B \-g
diff --git a/quotasys.c b/quotasys.c
index bd6692c..bbfcd5e 100644
--- a/quotasys.c
+++ b/quotasys.c
@@ -742,8 +742,6 @@ static int cache_mnt_table(int flags)
while ((mnt = getmntent(mntf))) {
const char *devname;
- if (!hasquota(mnt, USRQUOTA) && !hasquota(mnt, GRPQUOTA)) /* Check FS type and mount options */
- continue;
if (!(devname = get_device_name(mnt->mnt_fsname))) {
errstr(_("Can't get device name for %s\n"), mnt->mnt_fsname);
continue;
@@ -756,20 +754,32 @@ static int cache_mnt_table(int flags)
if (slen <= strlen(mnt->mnt_dir) && !strncmp(autofsdir[i], mnt->mnt_dir, slen))
break;
}
- if (i < autofsdircnt)
- continue;
-
- if (!realpath(mnt->mnt_dir, mntpointbuf)) {
- errstr(_("Can't resolve mountpoint path %s: %s\n"), mnt->mnt_dir, strerror(errno));
+ if (i < autofsdircnt) {
free((char *)devname);
continue;
}
+
if (flags & MS_NO_AUTOFS && !strcmp(mnt->mnt_type, MNTTYPE_AUTOFS)) { /* Autofs dir to remember? */
if (autofsdircnt == AUTOFS_DIR_MAX)
die(3, "Too many autofs mountpoints. Please contact <jack@suse.cz>\n");
- sstrncpy(autofsdir[autofsdircnt++], mntpointbuf, PATH_MAX);
+ sstrncpy(autofsdir[autofsdircnt++], mnt->mnt_dir, PATH_MAX);
+ free((char *)devname);
+ continue;
+ }
+
+ /* Further we are not interested in mountpoints without quotas and
+ we don't want to touch them */
+ if (!CORRECT_FSTYPE(mnt->mnt_type) || hasmntopt(mnt, MNTOPT_NOQUOTA) || !(hasmntopt(mnt, MNTOPT_USRQUOTA) || hasmntopt(mnt, MNTOPT_GRPQUOTA) || hasmntopt(mnt, MNTOPT_QUOTA) || !strcmp(mnt->mnt_type, MNTTYPE_NFS))) {
+ free((char *)devname);
+ continue;
+ }
+
+ if (!realpath(mnt->mnt_dir, mntpointbuf)) {
+ errstr(_("Can't resolve mountpoint path %s: %s\n"), mnt->mnt_dir, strerror(errno));
+ free((char *)devname);
continue;
}
+
if (statfs(mntpointbuf, &fsstat) != 0) {
errstr(_("Can't statfs() %s: %s\n"), mntpointbuf, strerror(errno));
free((char *)devname);