diff options
-rw-r--r-- | Changelog | 3 | ||||
-rw-r--r-- | quota.1 | 4 | ||||
-rw-r--r-- | quotasys.c | 26 |
3 files changed, 24 insertions, 9 deletions
@@ -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 @@ -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 @@ -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); |