- don't readmap on HUP for new mount. - add NIS_PARTIAL to map entry not found check and fix use after free bug.
40 lines
937 B
Diff
40 lines
937 B
Diff
autofs-5.0.3 - don't readmap on HUP for new mount
|
|
|
|
From: Ian Kent <raven@themaw.net>
|
|
|
|
If we're performing a new mount during a HUP signal then
|
|
we will read the map during the mount.
|
|
---
|
|
|
|
lib/master.c | 7 ++++---
|
|
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
|
|
|
|
--- autofs-5.0.3.orig/lib/master.c
|
|
+++ autofs-5.0.3/lib/master.c
|
|
@@ -1108,8 +1108,6 @@ int master_mount_mounts(struct master *m
|
|
}
|
|
cache_unlock(nc);
|
|
|
|
- check_update_map_sources(this, readall);
|
|
-
|
|
st_mutex_lock();
|
|
|
|
state_pipe = this->ap->state_pipe[1];
|
|
@@ -1120,11 +1118,14 @@ int master_mount_mounts(struct master *m
|
|
|
|
st_mutex_unlock();
|
|
|
|
- if (ret == -1 && save_errno == EBADF)
|
|
+ if (!ret)
|
|
+ check_update_map_sources(this, readall);
|
|
+ else if (ret == -1 && save_errno == EBADF) {
|
|
if (!master_do_mount(this)) {
|
|
list_del_init(&this->list);
|
|
master_free_mapent_sources(ap->entry, 1);
|
|
master_free_mapent(ap->entry);
|
|
+ }
|
|
}
|
|
}
|
|
|