|
|
306fa1 |
autofs-5.0.7 - dont fail on master map self include
|
|
|
306fa1 |
|
|
|
306fa1 |
From: Ian Kent <raven@themaw.net>
|
|
|
306fa1 |
|
|
|
306fa1 |
When reading the master map a self included file map should skip the source
|
|
|
306fa1 |
and proceed to the next so, in this case, return an nss status that will
|
|
|
306fa1 |
allow the map read to continue. In particular not NSS_STATUS_UNAVAIL which
|
|
|
306fa1 |
causes the lookup to record a failure or NSS_STATUS_SUCCESS which indicates
|
|
|
306fa1 |
a successful lookup and termintes the reading of sources.
|
|
|
306fa1 |
---
|
|
|
306fa1 |
CHANGELOG | 1 +
|
|
|
306fa1 |
modules/lookup_file.c | 7 ++++---
|
|
|
306fa1 |
2 files changed, 5 insertions(+), 3 deletions(-)
|
|
|
306fa1 |
|
|
|
306fa1 |
diff --git a/CHANGELOG b/CHANGELOG
|
|
|
306fa1 |
index 39388a5..97d6f48 100644
|
|
|
306fa1 |
--- a/CHANGELOG
|
|
|
306fa1 |
+++ b/CHANGELOG
|
|
|
306fa1 |
@@ -28,6 +28,7 @@
|
|
|
306fa1 |
- make yellow pages support optional.
|
|
|
306fa1 |
- modules/replicated.c: use sin6_addr.s6_addr32.
|
|
|
306fa1 |
- workaround missing GNU versionsort extension.
|
|
|
306fa1 |
+- dont fail on master map self include.
|
|
|
306fa1 |
|
|
|
306fa1 |
25/07/2012 autofs-5.0.7
|
|
|
306fa1 |
=======================
|
|
|
306fa1 |
diff --git a/modules/lookup_file.c b/modules/lookup_file.c
|
|
|
306fa1 |
index facb305..f37bed9 100644
|
|
|
306fa1 |
--- a/modules/lookup_file.c
|
|
|
306fa1 |
+++ b/modules/lookup_file.c
|
|
|
306fa1 |
@@ -397,8 +397,9 @@ int lookup_read_master(struct master *master, time_t age, void *context)
|
|
|
306fa1 |
unsigned int path_len, ent_len;
|
|
|
306fa1 |
int entry, cur_state;
|
|
|
306fa1 |
|
|
|
306fa1 |
+ /* Don't return fail on self include, skip source */
|
|
|
306fa1 |
if (master->recurse)
|
|
|
306fa1 |
- return NSS_STATUS_UNAVAIL;
|
|
|
306fa1 |
+ return NSS_STATUS_TRYAGAIN;
|
|
|
306fa1 |
|
|
|
306fa1 |
if (master->depth > MAX_INCLUDE_DEPTH) {
|
|
|
306fa1 |
error(logopt, MODPREFIX
|
|
|
306fa1 |
@@ -443,7 +444,7 @@ int lookup_read_master(struct master *master, time_t age, void *context)
|
|
|
306fa1 |
|
|
|
306fa1 |
inc = check_master_self_include(master, ctxt);
|
|
|
306fa1 |
if (inc)
|
|
|
306fa1 |
- master->recurse = 1;;
|
|
|
306fa1 |
+ master->recurse = 1;
|
|
|
306fa1 |
master->depth++;
|
|
|
306fa1 |
status = lookup_nss_read_master(master, age);
|
|
|
306fa1 |
if (!status) {
|
|
|
306fa1 |
@@ -645,7 +646,7 @@ int lookup_read_map(struct autofs_point *ap, time_t age, void *context)
|
|
|
306fa1 |
mc = source->mc;
|
|
|
306fa1 |
|
|
|
306fa1 |
if (source->recurse)
|
|
|
306fa1 |
- return NSS_STATUS_UNAVAIL;
|
|
|
306fa1 |
+ return NSS_STATUS_TRYAGAIN;
|
|
|
306fa1 |
|
|
|
306fa1 |
if (source->depth > MAX_INCLUDE_DEPTH) {
|
|
|
306fa1 |
error(ap->logopt,
|