diff options
-rw-r--r-- | Changelog | 2 | ||||
-rw-r--r-- | mntopt.h | 2 | ||||
-rw-r--r-- | quotacheck.c | 4 | ||||
-rw-r--r-- | quotasys.c | 35 | ||||
-rw-r--r-- | repquota.8 | 2 |
5 files changed, 39 insertions, 6 deletions
@@ -1,5 +1,7 @@ Changes in quota-tools from 3.02 to 3.03 +* +* removed bogus error message in mountpoint scanning (Jan Kara) * fixed mountpoint scanning initialization (solved rpc.rquotad SEGFAULT) (Jan Kara) * rpc.rquotad now doesn't need mountpoint for quota operations (Jan Kara) * fixed compilation on sparc (Michael Meskes, Jan Kara) @@ -18,5 +18,7 @@ #define MNTOPT_USRQUOTA "usrquota" /* enforce user quota */ #define MNTOPT_GRPQUOTA "grpquota" /* enforce group quota */ #define MNTOPT_RSQUASH "rsquash" /* root as ordinary user */ +#define MNTOPT_BIND "bind" /* binded mount */ +#define MNTOPT_LOOP "loop" /* loopback mount */ #endif diff --git a/quotacheck.c b/quotacheck.c index cbf8163..1abfde4 100644 --- a/quotacheck.c +++ b/quotacheck.c @@ -8,7 +8,7 @@ * New quota format implementation - Jan Kara <jack@suse.cz> - Sponsored by SuSE CR */ -#ident "$Id: quotacheck.c,v 1.24 2001/11/26 18:18:25 jkar8572 Exp $" +#ident "$Id: quotacheck.c,v 1.25 2001/12/05 14:14:46 jkar8572 Exp $" #include <dirent.h> #include <stdio.h> @@ -862,7 +862,7 @@ static void check_all(void) check_dir(mnt); } end_mounts_scan(); - if (!checked) + if (!checked && (!(flags & FL_ALL) || flags & (FL_VERBOSE | FL_DEBUG))) errstr(_("Can't find filesystem to check or filesystem not mounted with quota option.\n")); } @@ -657,9 +657,38 @@ static int cache_mnt_table(void) free((char *)devname); continue; } - if (!S_ISBLK(st.st_mode) && !S_ISCHR(st.st_mode)) - errstr(_("Warning: Device %s is not block nor character device.\n"), devname); - dev = st.st_rdev; + if (!S_ISBLK(st.st_mode) && !S_ISCHR(st.st_mode)) { /* Some 'bind' or 'loop' mount? */ + char *opt; + + if (hasmntopt(mnt, MNTOPT_BIND)) + dev = st.st_dev; + else if ((opt = hasmntopt(mnt, MNTOPT_LOOP))) { + if (!(opt = strchr(opt, '='))) { + errstr(_("Can't find device of loopback mount in options for %s. Skipping.\n"), devname); + free((char *)devname); + continue; + } + opt++; + if (stat(opt, &st) < 0) { /* Can't stat loopback device? */ + errstr(_("Can't stat() loopback device %s: %s\n"), opt, strerror(errno)); + free((char *)devname); + continue; + } + if (!S_ISBLK(st.st_mode)) { + errstr(_("Loopback device %s isn't block device!\n"), opt); + free((char *)devname); + continue; + } + dev = st.st_rdev; + } + else { + errstr(_("Device (%s) filesystem is mounted on isn't block or character device nor it's loopback or bind mount. Skipping.\n"), devname); + free((char *)devname); + continue; + } + } + else + dev = st.st_rdev; for (i = 0; i < mnt_entries_cnt && mnt_entries[i].me_dev != dev; i++); } /* Cope with network filesystems or new mountpoint */ @@ -98,7 +98,7 @@ default filesystems .B /etc/passwd default set of users .TP -.B /etc/passwd +.B /etc/group default set of groups .PD .SH SEE ALSO |