autofs-5.1.8 - fix return status of mount_autofs() From: Ian Kent The function mount_autofs() collects the status of mounting an autofs file system but doesn't actually return it. Signed-off-by: Ian Kent --- CHANGELOG | 1 + daemon/automount.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 251f8480..9b6f1737 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -56,6 +56,7 @@ - improve handling of ENOENT in sss setautomntent(). - don't immediately call function when waiting. - define LDAP_DEPRECATED during LDAP configure check. +- fix return status of mount_autofs(). 19/10/2021 autofs-5.1.8 - add xdr_exports(). diff --git a/daemon/automount.c b/daemon/automount.c index 7c4d4303..f66f00e5 100644 --- a/daemon/automount.c +++ b/daemon/automount.c @@ -1235,7 +1235,7 @@ static int autofs_init_ap(struct autofs_point *ap) static int mount_autofs(struct autofs_point *ap, const char *root) { - int status = 0; + int status; /* No need to create comms fds and command fifo if * unlinking mounts and exiting. @@ -1257,7 +1257,7 @@ static int mount_autofs(struct autofs_point *ap, const char *root) st_add_task(ap, ST_READY); - return 0; + return status; } static int handle_packet(struct autofs_point *ap)