diff --git a/SOURCES/autofs-5.1.3-reset-master-map-list-on-startup-retry.patch b/SOURCES/autofs-5.1.3-reset-master-map-list-on-startup-retry.patch deleted file mode 100644 index d2c17f5..0000000 --- a/SOURCES/autofs-5.1.3-reset-master-map-list-on-startup-retry.patch +++ /dev/null @@ -1,76 +0,0 @@ -autofs-5.1.3 - reset master map list on startup retry - -From: Ian Kent - -On autofs startup if automount thinks the master map read failed -for some reason it retries the read after waiting for a fairly -short delay. - -It should be ok to retry with the entries seen so far but there -may be cases where that causes problems so release any existing -master map entries before retrying. - -Signed-off-by: Ian Kent ---- - CHANGELOG | 1 + - daemon/automount.c | 25 +++++++++++++++++++++++++ - 2 files changed, 26 insertions(+) - ---- autofs-5.0.7.orig/CHANGELOG -+++ autofs-5.0.7/CHANGELOG -@@ -254,6 +254,7 @@ - - revert fix argc off by one in mount_autofs.c. - - allow dot in OPTIONSTR value lexer pattern. - - handle additional nfs versions in mount_nfs.c. -+- reset master map list on startup retry. - - 25/07/2012 autofs-5.0.7 - ======================= ---- autofs-5.0.7.orig/daemon/automount.c -+++ autofs-5.0.7/daemon/automount.c -@@ -2099,6 +2099,27 @@ static void remove_empty_args(char **arg - *argc = j; - } - -+static void do_master_list_reset(struct master *master) -+{ -+ struct list_head *head, *p; -+ -+ master_mutex_lock(); -+ -+ head = &master->mounts; -+ list_for_each(p, head) { -+ struct master_mapent *entry; -+ -+ entry = list_entry(p, struct master_mapent, list); -+ -+ if (!list_empty(&entry->list)) -+ list_del(&entry->list); -+ master_free_mapent_sources(entry, 1); -+ master_free_mapent(entry); -+ } -+ -+ master_mutex_unlock(); -+} -+ - static int do_master_read_master(struct master *master, int wait) - { - sigset_t signalset; -@@ -2118,6 +2139,8 @@ static int do_master_read_master(struct - while (1) { - struct timespec t = { retry_wait, 0 }; - -+ do_master_list_reset(master); -+ - age = time(NULL); - if (master_read_master(master, age, 0)) { - ret = 1; -@@ -2586,6 +2609,8 @@ int main(int argc, char *argv[]) - * Failed to read master map, continue with what - * we have anyway. - */ -+ do_master_list_reset(master_list); -+ age = time(NULL); - master_read_master(master_list, age, 1); - } - } diff --git a/SPECS/autofs.spec b/SPECS/autofs.spec index 776262f..e048848 100644 --- a/SPECS/autofs.spec +++ b/SPECS/autofs.spec @@ -8,7 +8,7 @@ Summary: A tool for automatically mounting and unmounting filesystems Name: autofs Version: 5.0.7 -Release: 70%{?dist}.1 +Release: 70%{?dist} Epoch: 1 License: GPLv2+ Group: System Environment/Daemons @@ -410,8 +410,6 @@ Patch793: autofs-5.1.3-revert-fix-argc-off-by-one-in-mount_autofs_c.patch Patch794: autofs-5.1.3-allow-dot-in-OPTIONSTR-value-lexer-pattern.patch Patch795: autofs-5.1.3-handle-additional-nfs-versions-in-mount_nfs_c.patch -Patch800: autofs-5.1.3-reset-master-map-list-on-startup-retry.patch - Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %if %{with_systemd} BuildRequires: systemd-units @@ -859,8 +857,6 @@ echo %{version}-%{release} > .version %patch794 -p1 %patch795 -p1 -%patch800 -p1 - %build LDFLAGS=-Wl,-z,now %configure --disable-mount-locking \ @@ -957,11 +953,6 @@ fi %dir /etc/auto.master.d %changelog -* Thu Oct 19 2017 Ian Kent - 5.0.7-70.el7_4.1 -- bz1515311 - Automount cannot access host shares after a reboot [rhel-7.4.z] - - reset master map list on startup retry. -- Resolves: rhbz#1515311 - * Thu Oct 19 2017 Ian Kent - 5.0.7-70.el7_4 - bz1503945 - autofs option parsing for maps with fstype=autofs no longer works [rhel-7.4.z]