autofs-5.1.9 - add flags argument to amd do_program_mount() From: Ian Kent Most of the amd mount functions take a flags argument that allows them to alter their function based on configuration. For example the amd option autofs_use_lofs will use bind mounts instead of symlinks in some cases which might be preferred. The program mount function was not being passed this parameter but the design of all the amd mount functions is quite similar and adding the flag works as expected.. Signed-off-by: Ian Kent --- CHANGELOG | 1 + modules/parse_amd.c | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) --- autofs-5.1.4.orig/CHANGELOG +++ autofs-5.1.4/CHANGELOG @@ -160,6 +160,7 @@ - don't free ext mount if mounted. - refactor amd function do_program_mount(). - refactor umount_amd_ext_mount(). +- add flags argument to amd do_program_mount(). xx/xx/2018 autofs-5.1.5 - fix flag file permission. --- autofs-5.1.4.orig/modules/parse_amd.c +++ autofs-5.1.4/modules/parse_amd.c @@ -1405,7 +1405,8 @@ out: } static int do_program_mount(struct autofs_point *ap, - struct amd_entry *entry, const char *name) + struct amd_entry *entry, const char *name, + unsigned int flags) { int rv = 1; @@ -1479,7 +1480,7 @@ static int do_program_mount(struct autof goto out; } done: - rv = do_link_mount(ap, name, entry, 0); + rv = do_link_mount(ap, name, entry, flags); if (rv) { if (!umount_amd_ext_mount(ap, entry->fs, 1)) { debug(ap->logopt, MODPREFIX @@ -1708,7 +1709,7 @@ static int amd_mount(struct autofs_point case AMD_MOUNT_TYPE_PROGRAM: if (!validate_program_options(ap->logopt, entry)) return 1; - ret = do_program_mount(ap, entry, name); + ret = do_program_mount(ap, entry, name, flags); break; default: