summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rquota_server.c8
-rw-r--r--rquota_svc.c12
-rw-r--r--rquotad.83
3 files changed, 17 insertions, 6 deletions
diff --git a/rquota_server.c b/rquota_server.c
index c8430a1..fbc8f71 100644
--- a/rquota_server.c
+++ b/rquota_server.c
@@ -9,7 +9,7 @@
*
* This part does the lookup of the info.
*
- * Version: $Id: rquota_server.c,v 1.11 2002/05/03 07:05:46 jkar8572 Exp $
+ * Version: $Id: rquota_server.c,v 1.12 2003/05/21 19:51:10 jkar8572 Exp $
*
* Author: Marco van Wieringen <mvw@planets.elm.net>
*
@@ -49,6 +49,8 @@
int allow_severity = LOG_INFO;
int deny_severity = LOG_WARNING;
+extern int enable_autofs;
+
/*
* Global unix authentication credentials.
*/
@@ -158,7 +160,7 @@ setquota_rslt *setquotainfo(int flags, caddr_t * argp, struct svc_req *rqstp)
result.status = Q_NOQUOTA;
result.setquota_rslt_u.sqr_rquota.rq_bsize = RPC_DQBLK_SIZE;
- if (init_mounts_scan(1, &pathname, MS_NO_MNTPOINT) < 0)
+ if (init_mounts_scan(1, &pathname, MS_NO_MNTPOINT | (enable_autofs ? 0 : MS_NO_AUTOFS)) < 0)
goto out;
if (!(mnt = get_next_mount())) {
end_mounts_scan();
@@ -242,7 +244,7 @@ getquota_rslt *getquotainfo(int flags, caddr_t * argp, struct svc_req * rqstp)
result.status = Q_NOQUOTA;
result.getquota_rslt_u.gqr_rquota.rq_bsize = RPC_DQBLK_SIZE;
- if (init_mounts_scan(1, &pathname, MS_NO_MNTPOINT) < 0)
+ if (init_mounts_scan(1, &pathname, MS_NO_MNTPOINT | (enable_autofs ? 0 : MS_NO_AUTOFS)) < 0)
goto out;
if (!(mnt = get_next_mount())) {
end_mounts_scan();
diff --git a/rquota_svc.c b/rquota_svc.c
index d37d591..42206fa 100644
--- a/rquota_svc.c
+++ b/rquota_svc.c
@@ -12,7 +12,7 @@
* changes for new utilities by Jan Kara <jack@suse.cz>
* patches by Jani Jaakkola <jjaakkol@cs.helsinki.fi>
*
- * Version: $Id: rquota_svc.c,v 1.13 2002/11/28 22:02:04 jkar8572 Exp $
+ * Version: $Id: rquota_svc.c,v 1.14 2003/05/21 19:51:10 jkar8572 Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -58,6 +58,7 @@ struct authunix_parms *unix_cred;
int disable_setquota=1; /* Disables setquota rpc */
int disable_daemon=0; /* Disable daemon() call */
+int enable_autofs=0; /* Don't ignore autofs mountpoins */
static struct option options[]= {
{ "version", 0, NULL, 'V' },
@@ -67,6 +68,7 @@ static struct option options[]= {
{ "no-setquota", 0 , NULL, 's' },
{ "setquota", 0, NULL, 'S' },
#endif
+ { "autofs", 0, NULL, 'I'},
{ NULL, 0, NULL , 0 }
};
@@ -78,12 +80,15 @@ static void show_help(void)
-V --version shows version information\n\
-F --foreground starts the quota service in foreground\n\
-s --no-setquota disables remote calls to setquota (default)\n\
- -S --setquota enables remote calls to setquota\n"), progname);
+ -S --setquota enables remote calls to setquota\n\
+ -I --autofs do not ignore mountpoints mounted by automounter\n"), progname);
+
#else
errstr(_("Usage: %s [options]\nOptions are:\n\
-h --help shows this text\n\
-V --version shows version information\n\
- -F --foreground starts the quota service in foreground\n"), progname);
+ -F --foreground starts the quota service in foreground\n\
+ -I --autofs do not ignore mountpoints mounted by automounter\n"), progname);
#endif
}
@@ -106,6 +111,7 @@ static void parse_options(int argc, char **argv)
case 's': disable_setquota = 1; break;
case 'S': disable_setquota = 0; break;
#endif
+ case 'I': enable_autofs = 1; break;
default:
errstr(_("Unknown option '%c'.\n"), opt);
show_help();
diff --git a/rquotad.8 b/rquotad.8
index 5b8ba5d..ad2d6bc 100644
--- a/rquotad.8
+++ b/rquotad.8
@@ -59,6 +59,9 @@ option.
.TP
.B \-F, \-\-foreground
Run daemon in foreground (may be useful for debugging purposes).
+.TP
+.B \-I, \-\-autofs
+Do not ignore autofs mountpoints.
.SH FILES
.PD 0