From 1b8dfe266937a37a4c642f96ceb2347bf4c00a17 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Fri, 10 Oct 2014 03:20:04 +0200 Subject: initial commit for Enea Linux 4.0-140929 Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea --- ...s-5.0.7-fix-null-map-entry-order-handling.patch | 81 ++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-null-map-entry-order-handling.patch (limited to 'meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-null-map-entry-order-handling.patch') diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-null-map-entry-order-handling.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-null-map-entry-order-handling.patch new file mode 100644 index 0000000000..610afaaa7a --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-null-map-entry-order-handling.patch @@ -0,0 +1,81 @@ +autofs-5.0.7 - fix null map entry order handling + +From: Ian Kent + +If a null map entry appears after a corresponding indirect map entry +autofs doesn't handle it properly. + +Since it appears after the map entry it should'nt affect it but autofs +doesn't account for this case and assumes the map entry is already +mounted and tries to shut it down causing attempted access to facilities +that don't exist. +--- + + CHANGELOG | 1 + + lib/master.c | 32 +++++++++++++++++++++++++++++--- + 2 files changed, 30 insertions(+), 3 deletions(-) + + +diff --git a/CHANGELOG b/CHANGELOG +index 7b8d185..79cf673 100644 +--- a/CHANGELOG ++++ b/CHANGELOG +@@ -7,6 +7,7 @@ + - fix typo in automount(8). + - dont wait forever to restart. + - add timeout option description to man page. ++- fix null map entry order handling. + + 25/07/2012 autofs-5.0.7 + ======================= +diff --git a/lib/master.c b/lib/master.c +index 904b13d..a0e62f2 100644 +--- a/lib/master.c ++++ b/lib/master.c +@@ -1179,9 +1179,35 @@ int master_mount_mounts(struct master *master, time_t age, int readall) + + cache_readlock(nc); + ne = cache_lookup_distinct(nc, this->path); +- if (ne && this->age > ne->age) { ++ /* ++ * If this path matched a nulled entry the master map entry ++ * must be an indirect mount so the master map entry line ++ * number may be obtained from this->maps. ++ */ ++ if (ne) { ++ int lineno = ne->age; + cache_unlock(nc); +- st_add_task(ap, ST_SHUTDOWN_PENDING); ++ ++ /* null entry appears after map entry */ ++ if (this->maps->master_line < lineno) { ++ warn(ap->logopt, ++ "ignoring null entry that appears after " ++ "existing entry for %s", this->path); ++ goto cont; ++ } ++ if (ap->state != ST_INIT) { ++ st_add_task(ap, ST_SHUTDOWN_PENDING); ++ continue; ++ } ++ /* ++ * The map entry hasn't been started yet and we've ++ * seen a preceeding null map entry for it so just ++ * delete it from the master map entry list so it ++ * doesn't get in the road. ++ */ ++ list_del_init(&this->list); ++ master_free_mapent_sources(ap->entry, 1); ++ master_free_mapent(ap->entry); + continue; + } + nested = cache_partial_match(nc, this->path); +@@ -1194,7 +1220,7 @@ int master_mount_mounts(struct master *master, time_t age, int readall) + cache_delete(nc, nested->key); + } + cache_unlock(nc); +- ++cont: + st_mutex_lock(); + + state_pipe = this->ap->state_pipe[1]; -- cgit v1.2.3-54-g00ecf