<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">autofs-5.0.5 - dont bind nfs mount if nobind is set

From: Ian Kent &lt;ikent@redhat.com&gt;

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 &amp;&amp; !port_opt &amp;&amp; this-&gt;proximity == PROXIMITY_LOCAL) {
+		if (!(nosymlink || nobind) &amp;&amp;
+		    !port_opt &amp;&amp; this-&gt;proximity == PROXIMITY_LOCAL) {
 			/* Local host -- do a "bind" */
 			const char *bind_options = ro ? "ro" : "";
 
</pre></body></html>