diff options
Diffstat (limited to 'meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-null-map-entry-order-handling.patch')
| -rw-r--r-- | meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-null-map-entry-order-handling.patch | 81 |
1 files changed, 0 insertions, 81 deletions
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 deleted file mode 100644 index 610afaaa7a..0000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-null-map-entry-order-handling.patch +++ /dev/null | |||
| @@ -1,81 +0,0 @@ | |||
| 1 | autofs-5.0.7 - fix null map entry order handling | ||
| 2 | |||
| 3 | From: Ian Kent <ikent@redhat.com> | ||
| 4 | |||
| 5 | If a null map entry appears after a corresponding indirect map entry | ||
| 6 | autofs doesn't handle it properly. | ||
| 7 | |||
| 8 | Since it appears after the map entry it should'nt affect it but autofs | ||
| 9 | doesn't account for this case and assumes the map entry is already | ||
| 10 | mounted and tries to shut it down causing attempted access to facilities | ||
| 11 | that don't exist. | ||
| 12 | --- | ||
| 13 | |||
| 14 | CHANGELOG | 1 + | ||
| 15 | lib/master.c | 32 +++++++++++++++++++++++++++++--- | ||
| 16 | 2 files changed, 30 insertions(+), 3 deletions(-) | ||
| 17 | |||
| 18 | |||
| 19 | diff --git a/CHANGELOG b/CHANGELOG | ||
| 20 | index 7b8d185..79cf673 100644 | ||
| 21 | --- a/CHANGELOG | ||
| 22 | +++ b/CHANGELOG | ||
| 23 | @@ -7,6 +7,7 @@ | ||
| 24 | - fix typo in automount(8). | ||
| 25 | - dont wait forever to restart. | ||
| 26 | - add timeout option description to man page. | ||
| 27 | +- fix null map entry order handling. | ||
| 28 | |||
| 29 | 25/07/2012 autofs-5.0.7 | ||
| 30 | ======================= | ||
| 31 | diff --git a/lib/master.c b/lib/master.c | ||
| 32 | index 904b13d..a0e62f2 100644 | ||
| 33 | --- a/lib/master.c | ||
| 34 | +++ b/lib/master.c | ||
| 35 | @@ -1179,9 +1179,35 @@ int master_mount_mounts(struct master *master, time_t age, int readall) | ||
| 36 | |||
| 37 | cache_readlock(nc); | ||
| 38 | ne = cache_lookup_distinct(nc, this->path); | ||
| 39 | - if (ne && this->age > ne->age) { | ||
| 40 | + /* | ||
| 41 | + * If this path matched a nulled entry the master map entry | ||
| 42 | + * must be an indirect mount so the master map entry line | ||
| 43 | + * number may be obtained from this->maps. | ||
| 44 | + */ | ||
| 45 | + if (ne) { | ||
| 46 | + int lineno = ne->age; | ||
| 47 | cache_unlock(nc); | ||
| 48 | - st_add_task(ap, ST_SHUTDOWN_PENDING); | ||
| 49 | + | ||
| 50 | + /* null entry appears after map entry */ | ||
| 51 | + if (this->maps->master_line < lineno) { | ||
| 52 | + warn(ap->logopt, | ||
| 53 | + "ignoring null entry that appears after " | ||
| 54 | + "existing entry for %s", this->path); | ||
| 55 | + goto cont; | ||
| 56 | + } | ||
| 57 | + if (ap->state != ST_INIT) { | ||
| 58 | + st_add_task(ap, ST_SHUTDOWN_PENDING); | ||
| 59 | + continue; | ||
| 60 | + } | ||
| 61 | + /* | ||
| 62 | + * The map entry hasn't been started yet and we've | ||
| 63 | + * seen a preceeding null map entry for it so just | ||
| 64 | + * delete it from the master map entry list so it | ||
| 65 | + * doesn't get in the road. | ||
| 66 | + */ | ||
| 67 | + list_del_init(&this->list); | ||
| 68 | + master_free_mapent_sources(ap->entry, 1); | ||
| 69 | + master_free_mapent(ap->entry); | ||
| 70 | continue; | ||
| 71 | } | ||
| 72 | nested = cache_partial_match(nc, this->path); | ||
| 73 | @@ -1194,7 +1220,7 @@ int master_mount_mounts(struct master *master, time_t age, int readall) | ||
| 74 | cache_delete(nc, nested->key); | ||
| 75 | } | ||
| 76 | cache_unlock(nc); | ||
| 77 | - | ||
| 78 | +cont: | ||
| 79 | st_mutex_lock(); | ||
| 80 | |||
| 81 | state_pipe = this->ap->state_pipe[1]; | ||
