File autofs-make-bind-mounts-propagation-slave-by-default.patch of Package autofs.14028

---
 modules/mount_bind.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

--- a/modules/mount_bind.c
+++ b/modules/mount_bind.c
@@ -20,6 +20,7 @@
 #include <sys/param.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <sys/mount.h>
 
 #define MODULE_MOUNT
 #include "automount.h"
@@ -178,8 +179,16 @@ int mount_mount(struct autofs_point *ap,
 			debug(ap->logopt,
 			      MODPREFIX "mounted %s type %s on %s",
 			      what, fstype, fullpath);
-			return 0;
 		}
+
+		err = mount(NULL, fullpath, NULL, MS_SLAVE, NULL);
+		if (err) {
+			warn(ap->logopt,
+					"failed to set propagation for %s",
+					fullpath, root);
+		}
+
+		return 0;
 	} else {
 		char *cp;
 		char basepath[PATH_MAX];
openSUSE Build Service is sponsored by