Ian Kent 3685ec
autofs-5.0.3 - fix nfs4 colon escape handling
Ian Kent 3685ec
Ian Kent 3685ec
From: Ian Kent <raven@themaw.net>
Ian Kent 3685ec
Ian Kent 3685ec
When fstype=nfs4 is given for a mount entry that should be bind
Ian Kent 3685ec
mounted because it has a ":" escaped location the colon can be
Ian Kent 3685ec
discarded before the mount module is called. This causes an
Ian Kent 3685ec
incorrect mount fail return since the replicated selection code
Ian Kent 3685ec
expects the colon to be present for parsing.
Ian Kent 3685ec
---
Ian Kent 3685ec
Ian Kent 3685ec
 modules/parse_sun.c |    2 +-
Ian Kent 3685ec
 1 files changed, 1 insertions(+), 1 deletions(-)
Ian Kent 3685ec
Ian Kent 3685ec
Ian Kent 3685ec
diff --git a/modules/parse_sun.c b/modules/parse_sun.c
Ian Kent 3685ec
index b548520..333f8a5 100644
Ian Kent 3685ec
--- a/modules/parse_sun.c
Ian Kent 3685ec
+++ b/modules/parse_sun.c
Ian Kent 3685ec
@@ -638,7 +638,7 @@ static int sun_mount(struct autofs_point *ap, const char *root,
Ian Kent 3685ec
 	}
Ian Kent 3685ec
 
Ian Kent 3685ec
 	pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cur_state);
Ian Kent 3685ec
-	if (!strcmp(fstype, "nfs")) {
Ian Kent 3685ec
+	if (!strcmp(fstype, "nfs") || !strcmp(fstype, "nfs4")) {
Ian Kent 3685ec
 		what = alloca(loclen + 1);
Ian Kent 3685ec
 		memcpy(what, loc, loclen);
Ian Kent 3685ec
 		what[loclen] = '\0';