Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 130701790bf2d95e902edf16031ff596 > files > 33

autofs-5.0.1-0.rc2.164.el5_8.src.rpm

autofs-5.0.1 - dont bind nfs mount if nobind is set

From: Ian Kent <ikent@redhat.com>

If the pseudo option "nobind" is set don't attempt a bind mount
if the file system is local.
---

 modules/mount_nfs.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


--- autofs-5.0.1.orig/modules/mount_nfs.c
+++ autofs-5.0.1/modules/mount_nfs.c
@@ -199,7 +199,8 @@ int mount_mount(struct autofs_point *ap,
 			port_opt = strstr(nfsoptions, "port=");
 
 		/* Port option specified, don't try to bind */
-		if (!nosymlink && !port_opt && this->proximity == PROXIMITY_LOCAL) {
+		if (!(nosymlink || nobind) &&
+		    !port_opt && this->proximity == PROXIMITY_LOCAL) {
 			/* Local host -- do a "bind" */
 			const char *bind_options = ro ? "ro" : "";