summaryrefslogtreecommitdiffstats
path: root/support/nfs
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@fieldses.org>2007-03-13 13:05:05 -0400
committerNeil Brown <neilb@suse.de>2007-03-15 09:48:17 +1100
commit74a8f33de5f26d6bab11d5299318035d65bd60d0 (patch)
treeacf3257e8f85ac5155a064ee68c84208c6f097d1 /support/nfs
parentafc841a1f2a62645ec2dfaa333baf07e44a03c08 (diff)
downloadnfs-utils-74a8f33de5f26d6bab11d5299318035d65bd60d0.tar.gz
nfs-utils-74a8f33de5f26d6bab11d5299318035d65bd60d0.tar.xz
nfs-utils-74a8f33de5f26d6bab11d5299318035d65bd60d0.zip
Remove "maptype" support
It appears that this is used only by unfsd, and is obscure enough that we should be able to just rip it out with no special precautions. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'support/nfs')
-rw-r--r--support/nfs/exports.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/support/nfs/exports.c b/support/nfs/exports.c
index 9638015..0baa5d0 100644
--- a/support/nfs/exports.c
+++ b/support/nfs/exports.c
@@ -48,7 +48,6 @@ static int getpath(char *path, int len);
static int parseopts(char *cp, struct exportent *ep, int warn, int *had_subtree_opt_ptr);
static int parsesquash(char *list, int **idp, int *lenp, char **ep);
static int parsenum(char **cpp);
-static int parsemaptype(char *type);
static void freesquash(void);
static void syntaxerr(char *msg);
@@ -94,7 +93,6 @@ getexportent(int fromkernel, int fromexports)
def_ee.e_flags &= ~NFSEXP_ASYNC;
def_ee.e_flags &= ~NFSEXP_GATHERED_WRITES;
}
- def_ee.e_maptype = CLE_MAP_IDENT;
def_ee.e_anonuid = 65534;
def_ee.e_anongid = 65534;
def_ee.e_squids = NULL;
@@ -245,21 +243,6 @@ putexportent(struct exportent *ep)
xlog(L_ERROR, "unknown fsloc method for %s:%s",
ep->e_hostname, ep->e_path);
}
- fprintf(fp, "mapping=");
- switch (ep->e_maptype) {
- case CLE_MAP_IDENT:
- fprintf(fp, "identity,");
- break;
- case CLE_MAP_UGIDD:
- fprintf(fp, "ugidd,");
- break;
- case CLE_MAP_FILE:
- fprintf(fp, "file,");
- break;
- default:
- xlog(L_ERROR, "unknown mapping type for %s:%s",
- ep->e_hostname, ep->e_path);
- }
if ((id = ep->e_squids) != NULL) {
fprintf(fp, "squash_uids=");
for (i = 0; i < ep->e_nsquids; i += 2)
@@ -317,7 +300,6 @@ mkexportent(char *hname, char *path, char *options)
static struct exportent ee;
ee.e_flags = EXPORT_DEFAULT_FLAGS;
- ee.e_maptype = CLE_MAP_IDENT;
ee.e_anonuid = 65534;
ee.e_anongid = 65534;
ee.e_squids = NULL;
@@ -447,12 +429,6 @@ parseopts(char *cp, struct exportent *ep, int warn, int *had_subtree_opt_ptr)
ep->e_flags &= ~NFSEXP_NOACL;
else if (strcmp(opt, "no_acl") == 0)
ep->e_flags |= NFSEXP_NOACL;
- else if (strncmp(opt, "mapping=", 8) == 0)
- ep->e_maptype = parsemaptype(opt+8);
- else if (strcmp(opt, "map_identity") == 0) /* old style */
- ep->e_maptype = CLE_MAP_IDENT;
- else if (strcmp(opt, "map_daemon") == 0) /* old style */
- ep->e_maptype = CLE_MAP_UGIDD;
else if (strncmp(opt, "anonuid=", 8) == 0) {
char *oe;
ep->e_anonuid = strtol(opt+8, &oe, 10);
@@ -625,19 +601,6 @@ parsenum(char **cpp)
}
static int
-parsemaptype(char *type)
-{
- if (!strcmp(type, "identity"))
- return CLE_MAP_IDENT;
- if (!strcmp(type, "ugidd"))
- return CLE_MAP_UGIDD;
- if (!strcmp(type, "file"))
- return CLE_MAP_FILE;
- syntaxerr("invalid map type");
- return CLE_MAP_IDENT; /* default */
-}
-
-static int
getpath(char *path, int len)
{
xskip(efp, " \t\n");