autofs-5.1.9 - fix amd external mount error handling From: Ian Kent An amd program mount might have defined its own umount program to be used for external mounts. In mount failure cases where the mount needs to be umounted be sure to use the custom umount if there is one. Signed-off-by: Ian Kent --- CHANGELOG | 1 + modules/parse_amd.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 505993f95..ba2fc5628 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ - fix crash in make_options_string(). - Fix incompatible function pointer types in cyrus-sasl module. - fix always recreate credential cache. +- fix amd external mount error handling. 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 fb6b1b760..e54c6ca45 100644 --- a/modules/parse_amd.c +++ b/modules/parse_amd.c @@ -1190,7 +1190,7 @@ static int do_generic_mount(struct autofs_point *ap, const char *name, } /* If we have an external mount add it to the list */ if (umount && !ext_mount_add(entry->fs, entry->umount)) { - umount_ent(ap, entry->fs); + umount_amd_ext_mount(ap, entry->fs); error(ap->logopt, MODPREFIX "error: could not add external mount %s", entry->fs); @@ -1240,7 +1240,7 @@ static int do_nfs_mount(struct autofs_point *ap, const char *name, } /* We might be using an external mount */ if (umount && !ext_mount_add(entry->fs, entry->umount)) { - umount_ent(ap, entry->fs); + umount_amd_ext_mount(ap, entry->fs); error(ap->logopt, MODPREFIX "error: could not add external mount %s", entry->fs); ret = 1; @@ -1469,7 +1469,7 @@ static int do_program_mount(struct autofs_point *ap, "%s: mounted %s", entry->type, entry->fs); goto do_free; } - umount_ent(ap, entry->fs); + umount_amd_ext_mount(ap, entry->fs); } if (!ext_mount_inuse(entry->fs))