autofs-5.0.5 - 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 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/modules/mount_nfs.c b/modules/mount_nfs.c
index 7b97f66..8b567d2 100644
--- a/modules/mount_nfs.c
+++ b/modules/mount_nfs.c
@@ -201,7 +201,8 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int
 			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" : "";
 
