autofs/autofs-5.1.9-add-flags-argument-to-amd-do_program_mount.patch
Ian Kent b58878d9dd Add Add fixes for Jiras RHEL-69485 RHEL-71359 and RHEL-57466
This MR adds fixes for several Jiras.

- RHEL-57466 - autofs crashes on startup after IDM client configuration
We have had several different reports caused by this bug which leads to a
SEGV with very little information about the cuase.

- Resolves: RHEL-57466

- RHEL-69485 - Sporadic mount failures with amd program maps on RHEL8.
This bug causes AMD-style program map mounts to sporadically not work.

- Resolves: RHEL-69485

- RHEL-71359 - RFE: autofs: add handling for AMD 'nounmount' option
This Jira adds support for a map option that was deferred in the original
implementtion. One of our customers needs this so it has been implemented.

- Resolves: RHEL-71359

Signed-off-by: Ian Kent <ikent@redhat.com>
2024-12-17 11:04:01 +08:00

61 lines
1.8 KiB
Diff

autofs-5.1.9 - add flags argument to amd do_program_mount()
From: Ian Kent <raven@themaw.net>
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 <raven@themaw.net>
---
CHANGELOG | 1 +
modules/parse_amd.c | 7 ++++---
2 files changed, 5 insertions(+), 3 deletions(-)
--- autofs-5.1.7.orig/CHANGELOG
+++ autofs-5.1.7/CHANGELOG
@@ -166,6 +166,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().
25/01/2021 autofs-5.1.7
- make bind mounts propagation slave by default.
--- autofs-5.1.7.orig/modules/parse_amd.c
+++ autofs-5.1.7/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: