summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rquota_server.c11
-rw-r--r--rquota_svc.c15
-rw-r--r--rquotad.816
3 files changed, 10 insertions, 32 deletions
diff --git a/rquota_server.c b/rquota_server.c
index 8494336..c610636 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.18 2007/08/23 19:58:14 jkar8572 Exp $
+ * Version: $Id: rquota_server.c,v 1.19 2007/08/27 12:32:57 jkar8572 Exp $
*
* Author: Marco van Wieringen <mvw@planets.elm.net>
*
@@ -49,7 +49,6 @@
/* Options from rquota_svc.c */
#define FL_AUTOFS 4
-#define FL_MIXED_PATHS 8
extern int flags;
extern char nfs_pseudoroot[PATH_MAX];
@@ -143,7 +142,7 @@ setquota_rslt *setquotainfo(int lflags, caddr_t * argp, struct svc_req *rqstp)
qcmd = arguments.ext_args->sqa_qcmd;
type = arguments.ext_args->sqa_type;
- if (!(flags & FL_MIXED_PATHS) || arguments.ext_args->sqa_pathp[0] != '/')
+ if (arguments.ext_args->sqa_pathp[0] != '/')
sstrncpy(pathname, nfs_pseudoroot, PATH_MAX);
sstrncat(pathname, arguments.ext_args->sqa_pathp, PATH_MAX);
servnet2utildqblk(&dqblk, &arguments.ext_args->sqa_dqblk);
@@ -159,7 +158,7 @@ setquota_rslt *setquotainfo(int lflags, caddr_t * argp, struct svc_req *rqstp)
qcmd = arguments.args->sqa_qcmd;
type = USRQUOTA;
- if (!(flags & FL_MIXED_PATHS) || arguments.args->sqa_pathp[0] != '/')
+ if (arguments.args->sqa_pathp[0] != '/')
sstrncpy(pathname, nfs_pseudoroot, PATH_MAX);
sstrncat(pathname, arguments.args->sqa_pathp, PATH_MAX);
servnet2utildqblk(&dqblk, &arguments.args->sqa_dqblk);
@@ -228,7 +227,7 @@ getquota_rslt *getquotainfo(int lflags, caddr_t * argp, struct svc_req * rqstp)
arguments.ext_args = (ext_getquota_args *) argp;
id = arguments.ext_args->gqa_id;
type = arguments.ext_args->gqa_type;
- if (!(flags & FL_MIXED_PATHS) || arguments.ext_args->gqa_pathp[0] != '/')
+ if (arguments.ext_args->gqa_pathp[0] != '/')
sstrncpy(pathname, nfs_pseudoroot, PATH_MAX);
sstrncat(pathname, arguments.ext_args->gqa_pathp, PATH_MAX);
@@ -247,7 +246,7 @@ getquota_rslt *getquotainfo(int lflags, caddr_t * argp, struct svc_req * rqstp)
arguments.args = (getquota_args *) argp;
id = arguments.args->gqa_uid;
type = USRQUOTA;
- if (!(flags & FL_MIXED_PATHS) || arguments.ext_args->gqa_pathp[0] != '/')
+ if (arguments.ext_args->gqa_pathp[0] != '/')
sstrncpy(pathname, nfs_pseudoroot, PATH_MAX);
sstrncat(pathname, arguments.args->gqa_pathp, PATH_MAX);
diff --git a/rquota_svc.c b/rquota_svc.c
index 1d0b326..c766eed 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.19 2007/08/23 19:58:14 jkar8572 Exp $
+ * Version: $Id: rquota_svc.c,v 1.20 2007/08/27 12:32:57 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
@@ -62,7 +62,6 @@ struct authunix_parms *unix_cred;
#define FL_SETQUOTA 1 /* Enable setquota rpc */
#define FL_NODAEMON 2 /* Disable daemon() call */
#define FL_AUTOFS 4 /* Don't ignore autofs mountpoints */
-#define FL_MIXED_PATHS 8 /* Prepend NFS pseudoroot only to relative paths */
int flags; /* Options specified on command line */
static int port; /* Port to use (0 for default one) */
@@ -80,7 +79,6 @@ static struct option options[]= {
{ "autofs", 0, NULL, 'I'},
{ "port", 1, NULL, 'p' },
{ "xtab", 1, NULL, 'x' },
- { "mixed-pathnames", 0, NULL, 'm'},
{ NULL, 0, NULL , 0 }
};
@@ -95,9 +93,7 @@ static void show_help(void)
-p --port <port> listen on given port\n\
-s --no-setquota disables remote calls to setquota (default)\n\
-S --setquota enables remote calls to setquota\n\
- -x --xtab <path> set an alternative file with NFSD export table\n\
- -m --mixed-pathnames prepend by NFS pseudoroot only pathnames without\n\
- leading slash\n"), progname);
+ -x --xtab <path> set an alternative file with NFSD export table\n"), progname);
#else
errstr(_("Usage: %s [options]\nOptions are:\n\
@@ -106,9 +102,7 @@ static void show_help(void)
-F --foreground starts the quota service in foreground\n\
-I --autofs do not ignore mountpoints mounted by automounter\n\
-p --port <port> listen on given port\n\
- -x --xtab <path> set an alternative file with NFSD export table\n\
- -m --mixed-pathnames prepend by NFS pseudoroot only pathnames without\n\
- leading slash\n"), progname);
+ -x --xtab <path> set an alternative file with NFSD export table\n"), progname);
#endif
}
@@ -162,9 +156,6 @@ static void parse_options(int argc, char **argv)
}
sstrncpy(xtab_path, optarg, PATH_MAX);
break;
- case 'm':
- flags |= FL_MIXED_PATHS;
- break;
default:
errstr(_("Unknown option '%c'.\n"), opt);
show_help();
diff --git a/rquotad.8 b/rquotad.8
index 787ccf6..c6b250a 100644
--- a/rquotad.8
+++ b/rquotad.8
@@ -72,20 +72,8 @@ Listen on alternate port
.B \-x \f2path\f3, \-\-xtab \f2path\f1
Set an alternative file with NFSD export table. This file is used to
determine pseudoroot of NFSv4 exports. The pseudoroot is then prepended
-to a path received in each quota RPC request. This may cause some
-troubles in environments with both NFSv3 and NFSv4 clients. In such cases
-consider
-.I mixed-pathnames
-option.
-.TP
-.B \-m, \-\-mixed-pathnames
-Prepend pseudoroot of NFSv4 exports only to pathnames which do not begin
-with a slash. This option is useful in environments with both NFSv3 and
-NFSv4 clients together with the same option of tools such as
-.BR quota (1).
-If you pass an option
-.I mixed-pathnames
-to these tools, they trim leading slashes from NFSv4 mounts in RPC requests.
+to each relative path (i.e. a path not beginning by '/') received in a
+quota RPC request.
.SH FILES
.PD 0