summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-fail-on-master-map-self-include.patch
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
commit1b8dfe266937a37a4c642f96ceb2347bf4c00a17 (patch)
tree0c6aab146bb3c82efd9c7846a9a4e70dcb0ec84f /meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-fail-on-master-map-self-include.patch
downloadmeta-openembedded-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
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.patch59
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 @@
1autofs-5.0.7 - dont fail on master map self include
2
3From: Ian Kent <raven@themaw.net>
4
5When reading the master map a self included file map should skip the source
6and proceed to the next so, in this case, return an nss status that will
7allow the map read to continue. In particular not NSS_STATUS_UNAVAIL which
8causes the lookup to record a failure or NSS_STATUS_SUCCESS which indicates
9a 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
15diff --git a/CHANGELOG b/CHANGELOG
16index 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 =======================
27diff --git a/modules/lookup_file.c b/modules/lookup_file.c
28index 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,