diff options
Diffstat (limited to 'meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-fail-on-master-map-self-include.patch')
-rw-r--r-- | meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-fail-on-master-map-self-include.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-fail-on-master-map-self-include.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-fail-on-master-map-self-include.patch new file mode 100644 index 0000000000..afb908b9e4 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-fail-on-master-map-self-include.patch | |||
@@ -0,0 +1,59 @@ | |||
1 | autofs-5.0.7 - dont fail on master map self include | ||
2 | |||
3 | From: Ian Kent <raven@themaw.net> | ||
4 | |||
5 | When reading the master map a self included file map should skip the source | ||
6 | and proceed to the next so, in this case, return an nss status that will | ||
7 | allow the map read to continue. In particular not NSS_STATUS_UNAVAIL which | ||
8 | causes the lookup to record a failure or NSS_STATUS_SUCCESS which indicates | ||
9 | a successful lookup and termintes the reading of sources. | ||
10 | --- | ||
11 | CHANGELOG | 1 + | ||
12 | modules/lookup_file.c | 7 ++++--- | ||
13 | 2 files changed, 5 insertions(+), 3 deletions(-) | ||
14 | |||
15 | diff --git a/CHANGELOG b/CHANGELOG | ||
16 | index 39388a5..97d6f48 100644 | ||
17 | --- a/CHANGELOG | ||
18 | +++ b/CHANGELOG | ||
19 | @@ -28,6 +28,7 @@ | ||
20 | - make yellow pages support optional. | ||
21 | - modules/replicated.c: use sin6_addr.s6_addr32. | ||
22 | - workaround missing GNU versionsort extension. | ||
23 | +- dont fail on master map self include. | ||
24 | |||
25 | 25/07/2012 autofs-5.0.7 | ||
26 | ======================= | ||
27 | diff --git a/modules/lookup_file.c b/modules/lookup_file.c | ||
28 | index facb305..f37bed9 100644 | ||
29 | --- a/modules/lookup_file.c | ||
30 | +++ b/modules/lookup_file.c | ||
31 | @@ -397,8 +397,9 @@ int lookup_read_master(struct master *master, time_t age, void *context) | ||
32 | unsigned int path_len, ent_len; | ||
33 | int entry, cur_state; | ||
34 | |||
35 | + /* Don't return fail on self include, skip source */ | ||
36 | if (master->recurse) | ||
37 | - return NSS_STATUS_UNAVAIL; | ||
38 | + return NSS_STATUS_TRYAGAIN; | ||
39 | |||
40 | if (master->depth > MAX_INCLUDE_DEPTH) { | ||
41 | error(logopt, MODPREFIX | ||
42 | @@ -443,7 +444,7 @@ int lookup_read_master(struct master *master, time_t age, void *context) | ||
43 | |||
44 | inc = check_master_self_include(master, ctxt); | ||
45 | if (inc) | ||
46 | - master->recurse = 1;; | ||
47 | + master->recurse = 1; | ||
48 | master->depth++; | ||
49 | status = lookup_nss_read_master(master, age); | ||
50 | if (!status) { | ||
51 | @@ -645,7 +646,7 @@ int lookup_read_map(struct autofs_point *ap, time_t age, void *context) | ||
52 | mc = source->mc; | ||
53 | |||
54 | if (source->recurse) | ||
55 | - return NSS_STATUS_UNAVAIL; | ||
56 | + return NSS_STATUS_TRYAGAIN; | ||
57 | |||
58 | if (source->depth > MAX_INCLUDE_DEPTH) { | ||
59 | error(ap->logopt, | ||