Blob Blame History Raw
autofs-5.0.3 - fix nfs4 colon escape handling

From: Ian Kent <raven@themaw.net>

When fstype=nfs4 is given for a mount entry that should be bind
mounted because it has a ":" escaped location the colon can be
discarded before the mount module is called. This causes an
incorrect mount fail return since the replicated selection code
expects the colon to be present for parsing.
---

 modules/parse_sun.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/modules/parse_sun.c b/modules/parse_sun.c
index b548520..333f8a5 100644
--- a/modules/parse_sun.c
+++ b/modules/parse_sun.c
@@ -638,7 +638,7 @@ static int sun_mount(struct autofs_point *ap, const char *root,
 	}
 
 	pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cur_state);
-	if (!strcmp(fstype, "nfs")) {
+	if (!strcmp(fstype, "nfs") || !strcmp(fstype, "nfs4")) {
 		what = alloca(loclen + 1);
 		memcpy(what, loc, loclen);
 		what[loclen] = '\0';