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(-) diff --git a/CHANGELOG b/CHANGELOG index bc1511192..30d311eb5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,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(). 02/11/2023 autofs-5.1.9 - fix kernel mount status notification. diff --git a/modules/parse_amd.c b/modules/parse_amd.c index 41e4b2d64..d70eb1693 100644 --- a/modules/parse_amd.c +++ b/modules/parse_amd.c @@ -1412,7 +1412,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; @@ -1486,7 +1487,7 @@ static int do_program_mount(struct autofs_point *ap, 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 @@ -1715,7 +1716,7 @@ static int amd_mount(struct autofs_point *ap, const char *name, 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: