diff options
Diffstat (limited to 'meta-networking')
25 files changed, 2582 insertions, 3 deletions
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-add-symlink-pseudo-option.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-add-symlink-pseudo-option.patch new file mode 100644 index 000000000..b0440f4a5 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-add-symlink-pseudo-option.patch | |||
@@ -0,0 +1,217 @@ | |||
1 | autofs-5.0.7 - add symlink pseudo option | ||
2 | |||
3 | From: Ian Kent <raven@themaw.net> | ||
4 | |||
5 | Add a "symlink" pseudo option to tell the bind mount module to symlink | ||
6 | instead of bind when mounting mounts other than direct mounts and | ||
7 | non-root indirect mount offset mounts (aka. non-root multi-mount | ||
8 | entries). | ||
9 | --- | ||
10 | CHANGELOG | 1 + | ||
11 | include/automount.h | 3 +++ | ||
12 | lib/master_parse.y | 8 +++++++- | ||
13 | lib/master_tok.l | 1 + | ||
14 | man/auto.master.5.in | 8 ++++++++ | ||
15 | modules/mount_autofs.c | 5 +++++ | ||
16 | modules/mount_bind.c | 36 +++++++++++++++++++++++++++++++++++- | ||
17 | 7 files changed, 60 insertions(+), 2 deletions(-) | ||
18 | |||
19 | diff --git a/CHANGELOG b/CHANGELOG | ||
20 | index c189483..247d334 100644 | ||
21 | --- a/CHANGELOG | ||
22 | +++ b/CHANGELOG | ||
23 | @@ -32,6 +32,7 @@ | ||
24 | - fix wildcard multi map regression. | ||
25 | - fix file descriptor leak when reloading the daemon. | ||
26 | - depricate nosymlink pseudo option. | ||
27 | +- add symlink pseudo option. | ||
28 | |||
29 | 25/07/2012 autofs-5.0.7 | ||
30 | ======================= | ||
31 | diff --git a/include/automount.h b/include/automount.h | ||
32 | index 37541f5..e72fa0d 100644 | ||
33 | --- a/include/automount.h | ||
34 | +++ b/include/automount.h | ||
35 | @@ -455,6 +455,9 @@ struct kernel_mod_version { | ||
36 | /* Don't use bind mounts even when system supports them */ | ||
37 | #define MOUNT_FLAG_NOBIND 0x0020 | ||
38 | |||
39 | +/* Use symlinks instead of bind mounting local mounts */ | ||
40 | +#define MOUNT_FLAG_SYMLINK 0x0040 | ||
41 | + | ||
42 | struct autofs_point { | ||
43 | pthread_t thid; | ||
44 | char *path; /* Mount point name */ | ||
45 | diff --git a/lib/master_parse.y b/lib/master_parse.y | ||
46 | index f925b5a..11caf5b 100644 | ||
47 | --- a/lib/master_parse.y | ||
48 | +++ b/lib/master_parse.y | ||
49 | @@ -57,6 +57,7 @@ static char *type; | ||
50 | static char *format; | ||
51 | static long timeout; | ||
52 | static long negative_timeout; | ||
53 | +static unsigned symlnk; | ||
54 | static unsigned nobind; | ||
55 | static unsigned ghost; | ||
56 | extern unsigned global_selection_options; | ||
57 | @@ -100,7 +101,7 @@ static int master_fprintf(FILE *, char *, ...); | ||
58 | %token COMMENT | ||
59 | %token MAP | ||
60 | %token OPT_TIMEOUT OPT_NTIMEOUT OPT_NOBIND OPT_NOGHOST OPT_GHOST OPT_VERBOSE | ||
61 | -%token OPT_DEBUG OPT_RANDOM OPT_USE_WEIGHT | ||
62 | +%token OPT_DEBUG OPT_RANDOM OPT_USE_WEIGHT OPT_SYMLINK | ||
63 | %token COLON COMMA NL DDASH | ||
64 | %type <strtype> map | ||
65 | %type <strtype> options | ||
66 | @@ -186,6 +187,7 @@ line: | ||
67 | | PATH OPT_USE_WEIGHT { master_notify($1); YYABORT; } | ||
68 | | PATH OPT_DEBUG { master_notify($1); YYABORT; } | ||
69 | | PATH OPT_TIMEOUT { master_notify($1); YYABORT; } | ||
70 | + | PATH OPT_SYMLINK { master_notify($1); YYABORT; } | ||
71 | | PATH OPT_NOBIND { master_notify($1); YYABORT; } | ||
72 | | PATH OPT_GHOST { master_notify($1); YYABORT; } | ||
73 | | PATH OPT_NOGHOST { master_notify($1); YYABORT; } | ||
74 | @@ -557,6 +559,7 @@ option: daemon_option | ||
75 | |||
76 | daemon_option: OPT_TIMEOUT NUMBER { timeout = $2; } | ||
77 | | OPT_NTIMEOUT NUMBER { negative_timeout = $2; } | ||
78 | + | OPT_SYMLINK { symlnk = 1; } | ||
79 | | OPT_NOBIND { nobind = 1; } | ||
80 | | OPT_NOGHOST { ghost = 0; } | ||
81 | | OPT_GHOST { ghost = 1; } | ||
82 | @@ -627,6 +630,7 @@ static void local_init_vars(void) | ||
83 | debug = 0; | ||
84 | timeout = -1; | ||
85 | negative_timeout = 0; | ||
86 | + symlnk = 0; | ||
87 | nobind = 0; | ||
88 | ghost = defaults_get_browse_mode(); | ||
89 | random_selection = global_selection_options & MOUNT_FLAG_RANDOM_SELECT; | ||
90 | @@ -811,6 +815,8 @@ int master_parse_entry(const char *buffer, unsigned int default_timeout, unsigne | ||
91 | entry->ap->flags |= MOUNT_FLAG_RANDOM_SELECT; | ||
92 | if (use_weight) | ||
93 | entry->ap->flags |= MOUNT_FLAG_USE_WEIGHT_ONLY; | ||
94 | + if (symlnk) | ||
95 | + entry->ap->flags |= MOUNT_FLAG_SYMLINK; | ||
96 | if (negative_timeout) | ||
97 | entry->ap->negative_timeout = negative_timeout; | ||
98 | |||
99 | diff --git a/lib/master_tok.l b/lib/master_tok.l | ||
100 | index 30abb15..f9b4e55 100644 | ||
101 | --- a/lib/master_tok.l | ||
102 | +++ b/lib/master_tok.l | ||
103 | @@ -361,6 +361,7 @@ OPTNTOUT (-n{OPTWS}|-n{OPTWS}={OPTWS}|--negative-timeout{OPTWS}|--negative-timeo | ||
104 | return(NUMBER); | ||
105 | } | ||
106 | |||
107 | + -?symlink { return(OPT_SYMLINK); } | ||
108 | -?nobind { return(OPT_NOBIND); } | ||
109 | -?nobrowse { return(OPT_NOGHOST); } | ||
110 | -g|--ghost|-?browse { return(OPT_GHOST); } | ||
111 | diff --git a/man/auto.master.5.in b/man/auto.master.5.in | ||
112 | index 8007542..bbea43a 100644 | ||
113 | --- a/man/auto.master.5.in | ||
114 | +++ b/man/auto.master.5.in | ||
115 | @@ -159,6 +159,14 @@ on individual map entries of both types. Bind mounting of NFS file | ||
116 | systems can also be prevented for specific map entrys by adding the | ||
117 | "port=" mount option to the entries. | ||
118 | .TP | ||
119 | +.I "symlink" | ||
120 | +This option makes bind mounting use a symlink instead of an actual bind | ||
121 | +mount. It is an autofs specific option that is a pseudo mount option and | ||
122 | +so is given without a leading dash. It may be used with indirect map | ||
123 | +entries only, either in the master map (so it effects all map entries) | ||
124 | +or with individual map entries. The option is ignored for direct mounts | ||
125 | +and non-root offest mount entries. | ||
126 | +.TP | ||
127 | .I "\-r, \-\-random-multimount-selection" | ||
128 | Enables the use of ramdom selection when choosing a host from a | ||
129 | list of replicated servers. This option is applied to this mount | ||
130 | diff --git a/modules/mount_autofs.c b/modules/mount_autofs.c | ||
131 | index ef16020..8c1e600 100644 | ||
132 | --- a/modules/mount_autofs.c | ||
133 | +++ b/modules/mount_autofs.c | ||
134 | @@ -51,6 +51,7 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, | ||
135 | int argc, status; | ||
136 | int nobind = ap->flags & MOUNT_FLAG_NOBIND; | ||
137 | int ghost = ap->flags & MOUNT_FLAG_GHOST; | ||
138 | + int symlnk = ap->flags & MOUNT_FLAG_SYMLINK; | ||
139 | time_t timeout = ap->entry->maps->exp_timeout; | ||
140 | unsigned logopt = ap->logopt; | ||
141 | struct map_type_info *info; | ||
142 | @@ -120,6 +121,8 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, | ||
143 | nobind = 1; | ||
144 | else if (strncmp(cp, "browse", 6) == 0) | ||
145 | ghost = 1; | ||
146 | + else if (strncmp(cp, "symlink", 7) == 0) | ||
147 | + symlnk = 1; | ||
148 | else if (strncmp(cp, "timeout=", 8) == 0) { | ||
149 | char *val = strchr(cp, '='); | ||
150 | unsigned tout; | ||
151 | @@ -158,6 +161,8 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, | ||
152 | } | ||
153 | nap = entry->ap; | ||
154 | nap->parent = ap; | ||
155 | + if (symlnk) | ||
156 | + nap->flags |= MOUNT_FLAG_SYMLINK; | ||
157 | |||
158 | argc = 1; | ||
159 | |||
160 | diff --git a/modules/mount_bind.c b/modules/mount_bind.c | ||
161 | index 9bce686..4975294 100644 | ||
162 | --- a/modules/mount_bind.c | ||
163 | +++ b/modules/mount_bind.c | ||
164 | @@ -73,10 +73,44 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int | ||
165 | char buf[MAX_ERR_BUF]; | ||
166 | int err; | ||
167 | int i, len; | ||
168 | + int symlnk = (*name != '/' && (ap->flags & MOUNT_FLAG_SYMLINK)); | ||
169 | |||
170 | if (ap->flags & MOUNT_FLAG_REMOUNT) | ||
171 | return 0; | ||
172 | |||
173 | + /* Extract "symlink" pseudo-option which forces local filesystems | ||
174 | + * to be symlinked instead of bound. | ||
175 | + */ | ||
176 | + if (*name != '/' && !symlnk && options) { | ||
177 | + const char *comma; | ||
178 | + int o_len = strlen(options) + 1; | ||
179 | + | ||
180 | + for (comma = options; *comma != '\0';) { | ||
181 | + const char *cp; | ||
182 | + const char *end; | ||
183 | + | ||
184 | + while (*comma == ',') | ||
185 | + comma++; | ||
186 | + | ||
187 | + /* Skip leading white space */ | ||
188 | + while (*comma == ' ' || *comma == '\t') | ||
189 | + comma++; | ||
190 | + | ||
191 | + cp = comma; | ||
192 | + while (*comma != '\0' && *comma != ',') | ||
193 | + comma++; | ||
194 | + | ||
195 | + /* Skip trailing white space */ | ||
196 | + end = comma - 1; | ||
197 | + while (*comma == ' ' || *comma == '\t') | ||
198 | + end--; | ||
199 | + | ||
200 | + o_len = end - cp + 1; | ||
201 | + if (strncmp("symlink", cp, o_len) == 0) | ||
202 | + symlnk = 1; | ||
203 | + } | ||
204 | + } | ||
205 | + | ||
206 | /* Root offset of multi-mount */ | ||
207 | len = strlen(root); | ||
208 | if (root[len - 1] == '/') { | ||
209 | @@ -100,7 +134,7 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int | ||
210 | if (options == NULL || *options == '\0') | ||
211 | options = "defaults"; | ||
212 | |||
213 | - if (bind_works) { | ||
214 | + if (!symlnk && bind_works) { | ||
215 | int status, existed = 1; | ||
216 | |||
217 | debug(ap->logopt, MODPREFIX "calling mkdir_path %s", fullpath); | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-allow-nsswitch_conf-to-not-contain-automount-lines.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-allow-nsswitch_conf-to-not-contain-automount-lines.patch new file mode 100644 index 000000000..c342d1072 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-allow-nsswitch_conf-to-not-contain-automount-lines.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | autofs-5.0.7 - Allow nsswitch.conf to not contain "automount:" lines | ||
2 | |||
3 | From: Michael Tokarev <mjt@tls.msk.ru> | ||
4 | |||
5 | Current code does not allow a case when nsswitch.conf | ||
6 | does not mention automount map at all, like all new | ||
7 | installations. It logs a rather unpleasant error | ||
8 | message instead: | ||
9 | |||
10 | syntax error in nsswitch config near [ syntax error ] | ||
11 | |||
12 | this patch has a minimal fix, to allo "file" to be empty. | ||
13 | |||
14 | Whole parser in C is about 25 lines of code, the "grammar" | ||
15 | is trivial, and it is better to ditch all this yacc/lex | ||
16 | stuff, but that will be much more intrusive change. | ||
17 | |||
18 | Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> | ||
19 | Cc: 682266@bugs.debian.org | ||
20 | --- | ||
21 | |||
22 | CHANGELOG | 1 + | ||
23 | lib/nss_parse.y | 1 + | ||
24 | 2 files changed, 2 insertions(+), 0 deletions(-) | ||
25 | |||
26 | |||
27 | diff --git a/CHANGELOG b/CHANGELOG | ||
28 | index bd0dd82..16ac2a0 100644 | ||
29 | --- a/CHANGELOG | ||
30 | +++ b/CHANGELOG | ||
31 | @@ -16,6 +16,7 @@ | ||
32 | - increase file map read buffer size. | ||
33 | - handle new location of systemd. | ||
34 | - fix map entry duplicate offset detection. | ||
35 | +- Allow nsswitch.conf to not contain "automount:" lines. | ||
36 | |||
37 | 25/07/2012 autofs-5.0.7 | ||
38 | ======================= | ||
39 | diff --git a/lib/nss_parse.y b/lib/nss_parse.y | ||
40 | index a39fda4..055e9d7 100644 | ||
41 | --- a/lib/nss_parse.y | ||
42 | +++ b/lib/nss_parse.y | ||
43 | @@ -72,6 +72,7 @@ file: { | ||
44 | nss_debug = YYDEBUG; | ||
45 | #endif | ||
46 | } sources NL | ||
47 | + | /* empty */ | ||
48 | ; | ||
49 | |||
50 | sources: nss_source | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-depricate-nosymlink-pseudo-option.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-depricate-nosymlink-pseudo-option.patch new file mode 100644 index 000000000..c784de7c9 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-depricate-nosymlink-pseudo-option.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | autofs-5.0.7 - depricate nosymlink pseudo option | ||
2 | |||
3 | From: Ian Kent <raven@themaw.net> | ||
4 | |||
5 | The undocumented "nosymlink" option was the only way to force local | ||
6 | NFS mounting until the more descriptive "nobind" option was added. | ||
7 | |||
8 | So depricate the "nosymlink" option in favour of the "nobind" option. | ||
9 | --- | ||
10 | CHANGELOG | 1 + | ||
11 | modules/mount_nfs.c | 4 ++++ | ||
12 | 2 files changed, 5 insertions(+) | ||
13 | |||
14 | diff --git a/CHANGELOG b/CHANGELOG | ||
15 | index a7ed212..c189483 100644 | ||
16 | --- a/CHANGELOG | ||
17 | +++ b/CHANGELOG | ||
18 | @@ -31,6 +31,7 @@ | ||
19 | - dont fail on master map self include. | ||
20 | - fix wildcard multi map regression. | ||
21 | - fix file descriptor leak when reloading the daemon. | ||
22 | +- depricate nosymlink pseudo option. | ||
23 | |||
24 | 25/07/2012 autofs-5.0.7 | ||
25 | ======================= | ||
26 | diff --git a/modules/mount_nfs.c b/modules/mount_nfs.c | ||
27 | index bbbb1de..e61320b 100644 | ||
28 | --- a/modules/mount_nfs.c | ||
29 | +++ b/modules/mount_nfs.c | ||
30 | @@ -125,6 +125,10 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int | ||
31 | |||
32 | o_len = end - cp + 1; | ||
33 | if (strncmp("nosymlink", cp, o_len) == 0) { | ||
34 | + warn(ap->logopt, MODPREFIX | ||
35 | + "the \"nosymlink\" option is depricated " | ||
36 | + "and will soon be removed, " | ||
37 | + "use the \"nobind\" option instead"); | ||
38 | nosymlink = 1; | ||
39 | } else if (strncmp("nobind", cp, o_len) == 0) { | ||
40 | nobind = 1; | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-document-browse-option-in-man-page.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-document-browse-option-in-man-page.patch new file mode 100644 index 000000000..4641342d2 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-document-browse-option-in-man-page.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | autofs-5.0.7 - document browse option in man page | ||
2 | |||
3 | From: Ian Kent <raven@themaw.net> | ||
4 | |||
5 | The "browse" option has remained undocumented for a long time. | ||
6 | Finally add a section for it to auto.master(5) making special | ||
7 | note of the potential performance implications. | ||
8 | --- | ||
9 | CHANGELOG | 1 + | ||
10 | man/auto.master.5.in | 11 +++++++++++ | ||
11 | 2 files changed, 12 insertions(+) | ||
12 | |||
13 | diff --git a/CHANGELOG b/CHANGELOG | ||
14 | index ecdea0b..d8e4049 100644 | ||
15 | --- a/CHANGELOG | ||
16 | +++ b/CHANGELOG | ||
17 | @@ -36,6 +36,7 @@ | ||
18 | - fix requires in spec file. | ||
19 | - fix libtirpc build option to require libtirpc-devel if needed. | ||
20 | - fix systemd unidir in spec file. | ||
21 | +- document browse option in man page. | ||
22 | |||
23 | 25/07/2012 autofs-5.0.7 | ||
24 | ======================= | ||
25 | diff --git a/man/auto.master.5.in b/man/auto.master.5.in | ||
26 | index bbea43a..c552e56 100644 | ||
27 | --- a/man/auto.master.5.in | ||
28 | +++ b/man/auto.master.5.in | ||
29 | @@ -147,6 +147,17 @@ multiple file systems should be mounted (`multimounts'). If this option | ||
30 | is given, no file system is mounted at all if at least one file system | ||
31 | can't be mounted. | ||
32 | .TP | ||
33 | +.I "[no]browse" | ||
34 | +This is an autofs specific option that is a pseudo mount option and | ||
35 | +so is given without a leading dash. Use of the browse option pre-creates | ||
36 | +mount point directories for indirect mount maps so the map keys can be | ||
37 | +seen in a directory listing without being mounted. Use of this option | ||
38 | +can cause performance problem if the indirect map is large so it should | ||
39 | +be used with caution. The internal program default is to enable browse | ||
40 | +mode for indirect mounts but the default installed configuration overrides | ||
41 | +this by setting BROWSE_MODE to "no" because of the potential performance | ||
42 | +problem. | ||
43 | +.TP | ||
44 | .I "nobind" | ||
45 | This is an autofs specific option that is a pseudo mount option and | ||
46 | so is given without a leading dash. It may be used either in the master | ||
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 000000000..afb908b9e --- /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, | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-schedule-new-alarms-after-readmap.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-schedule-new-alarms-after-readmap.patch new file mode 100644 index 000000000..64446874c --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-schedule-new-alarms-after-readmap.patch | |||
@@ -0,0 +1,69 @@ | |||
1 | autofs-5.0.7 - don't schedule new alarms after readmap | ||
2 | |||
3 | From: Leonardo Chiquitto <leonardo.lists@gmail.com> | ||
4 | |||
5 | Currently, a new alarm is scheduled every time the daemon receives | ||
6 | a SIGHUP (map re-read) or SIGUSR1 (forced expiration). Besides that, | ||
7 | map re-reads started on demand when a map is found to be outdated | ||
8 | also generate a new alarm. | ||
9 | |||
10 | Once added, these alarms are never deleted and hence increase the | ||
11 | number of times the daemon wakes up to run the expiration procedure. | ||
12 | After a couple of months, in setups with many mount points, it's | ||
13 | normal to see automount waking up every second to handle the | ||
14 | expiration timer. | ||
15 | |||
16 | This patch removes the alarm scheduling from the readmap cleanup | ||
17 | routine and makes sure the alarm is re-added after the expiration | ||
18 | process only when it was not triggered by SIGUSR1. | ||
19 | |||
20 | I couldn't think of any use case to justify keeping these alarms: | ||
21 | it's critical to have the alarm ticking every timeout/4 seconds, | ||
22 | but more than one periodic alarm running doesn't seem to make | ||
23 | sense. | ||
24 | --- | ||
25 | |||
26 | CHANGELOG | 1 + | ||
27 | daemon/state.c | 6 +----- | ||
28 | 2 files changed, 2 insertions(+), 5 deletions(-) | ||
29 | |||
30 | |||
31 | diff --git a/CHANGELOG b/CHANGELOG | ||
32 | index c9be73e..4cf5621 100644 | ||
33 | --- a/CHANGELOG | ||
34 | +++ b/CHANGELOG | ||
35 | @@ -22,6 +22,7 @@ | ||
36 | - fix init script status return. | ||
37 | - fix use get_proximity() without libtirpc. | ||
38 | - don't use dirent d_type to filter out files in scandir() | ||
39 | +- don't schedule new alarms after readmap. | ||
40 | |||
41 | 25/07/2012 autofs-5.0.7 | ||
42 | ======================= | ||
43 | diff --git a/daemon/state.c b/daemon/state.c | ||
44 | index b451c56..6e23022 100644 | ||
45 | --- a/daemon/state.c | ||
46 | +++ b/daemon/state.c | ||
47 | @@ -144,7 +144,7 @@ void expire_cleanup(void *arg) | ||
48 | ap->submount = 2; | ||
49 | } | ||
50 | |||
51 | - if (!ap->submount) | ||
52 | + if (ap->state == ST_EXPIRE && !ap->submount) | ||
53 | alarm_add(ap, ap->exp_runfreq); | ||
54 | |||
55 | /* FALLTHROUGH */ | ||
56 | @@ -330,13 +330,9 @@ static void do_readmap_cleanup(void *arg) | ||
57 | ap = ra->ap; | ||
58 | |||
59 | st_mutex_lock(); | ||
60 | - | ||
61 | ap->readmap_thread = 0; | ||
62 | st_set_done(ap); | ||
63 | - if (!ap->submount) | ||
64 | - alarm_add(ap, ap->exp_runfreq); | ||
65 | st_ready(ap); | ||
66 | - | ||
67 | st_mutex_unlock(); | ||
68 | |||
69 | free(ra); | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-use-dirent-d_type-to-filter-out-files-in-scandir.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-use-dirent-d_type-to-filter-out-files-in-scandir.patch new file mode 100644 index 000000000..9c9d99b95 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-use-dirent-d_type-to-filter-out-files-in-scandir.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | autofs-5.0.7 - don't use dirent d_type to filter out files in scandir() | ||
2 | |||
3 | From: Leonardo Chiquitto <leonardo.lists@gmail.com> | ||
4 | |||
5 | The "d_type" field of a dirent structure is not filled in by all | ||
6 | file systems (XFS being one example), so we can't rely on it to | ||
7 | check file types. | ||
8 | --- | ||
9 | |||
10 | CHANGELOG | 1 + | ||
11 | modules/lookup_dir.c | 4 ---- | ||
12 | 2 files changed, 1 insertions(+), 4 deletions(-) | ||
13 | |||
14 | |||
15 | diff --git a/CHANGELOG b/CHANGELOG | ||
16 | index 460bd27..c9be73e 100644 | ||
17 | --- a/CHANGELOG | ||
18 | +++ b/CHANGELOG | ||
19 | @@ -21,6 +21,7 @@ | ||
20 | - fix submount offset delete. | ||
21 | - fix init script status return. | ||
22 | - fix use get_proximity() without libtirpc. | ||
23 | +- don't use dirent d_type to filter out files in scandir() | ||
24 | |||
25 | 25/07/2012 autofs-5.0.7 | ||
26 | ======================= | ||
27 | diff --git a/modules/lookup_dir.c b/modules/lookup_dir.c | ||
28 | index 658cc29..33901c0 100644 | ||
29 | --- a/modules/lookup_dir.c | ||
30 | +++ b/modules/lookup_dir.c | ||
31 | @@ -103,10 +103,6 @@ static int acceptable_dirent_p(const struct dirent *e) | ||
32 | { | ||
33 | size_t namesz; | ||
34 | |||
35 | - | ||
36 | - if (!(e->d_type == DT_REG || e->d_type == DT_LNK)) | ||
37 | - return 0; | ||
38 | - | ||
39 | namesz = strlen(e->d_name); | ||
40 | if (!namesz) | ||
41 | return 0; | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-automounter-support-on-parisc.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-automounter-support-on-parisc.patch new file mode 100644 index 000000000..e00fdc190 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-automounter-support-on-parisc.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | autofs-5.0.7 - fix automounter support on parisc | ||
2 | |||
3 | From: Helge Deller <deller@gmx.de> | ||
4 | |||
5 | This patch fixes automounter support on the parisc architecture with | ||
6 | 64-bit kernel and 32-bit userspace. | ||
7 | |||
8 | Signed-off-by: Helge Deller <deller@gmx.de> | ||
9 | --- | ||
10 | daemon/automount.c | 1 + | ||
11 | 1 file changed, 1 insertion(+) | ||
12 | |||
13 | diff --git a/daemon/automount.c b/daemon/automount.c | ||
14 | index 4a3eb3d..4c651cf 100644 | ||
15 | --- a/daemon/automount.c | ||
16 | +++ b/daemon/automount.c | ||
17 | @@ -610,6 +610,7 @@ static size_t get_kpkt_len(void) | ||
18 | if (strcmp(un.machine, "alpha") == 0 || | ||
19 | strcmp(un.machine, "ia64") == 0 || | ||
20 | strcmp(un.machine, "x86_64") == 0 || | ||
21 | + strcmp(un.machine, "parisc64") == 0 || | ||
22 | strcmp(un.machine, "ppc64") == 0) | ||
23 | pkt_len += 4; | ||
24 | |||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-file-descriptor-leak-when-reloading-the-daemon.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-file-descriptor-leak-when-reloading-the-daemon.patch new file mode 100644 index 000000000..8ce6c0f9e --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-file-descriptor-leak-when-reloading-the-daemon.patch | |||
@@ -0,0 +1,179 @@ | |||
1 | autofs-5.0.7 - fix file descriptor leak when reloading the daemon | ||
2 | |||
3 | From: Leonardo Chiquitto <leonardo.lists@gmail.com> | ||
4 | |||
5 | A customer reported that AutoFS may leak file descriptors when some | ||
6 | maps are modified and the daemon reloaded. I'm able to reproduce the | ||
7 | problem on 5.0.7 by following these steps: | ||
8 | |||
9 | 1. Configure a simple direct mount: | ||
10 | |||
11 | # cat /etc/auto.master | ||
12 | /- /etc/auto.direct | ||
13 | |||
14 | # cat /etc/auto.direct | ||
15 | /nfs server:/nfs | ||
16 | |||
17 | 2. Start the automounter and do NOT trigger the mount | ||
18 | |||
19 | 3. Replace /etc/auto.direct with: | ||
20 | |||
21 | # cat /etc/auto.direct | ||
22 | /nfs/1 server:/nfs | ||
23 | /nfs/2 server:/nfs | ||
24 | |||
25 | 4. Reload: | ||
26 | |||
27 | # kill -HUP $(pidof automount) | ||
28 | |||
29 | >From now on, every reload will leak a file descriptor: | ||
30 | |||
31 | # ls -la /proc/$(pidof automount)/fd | grep /nfs | ||
32 | lr-x------ 1 root root 64 Aug 14 22:08 11 -> /nfs | ||
33 | lr-x------ 1 root root 64 Aug 14 22:08 12 -> /nfs | ||
34 | lr-x------ 1 root root 64 Aug 14 22:08 13 -> /nfs | ||
35 | lr-x------ 1 root root 64 Aug 14 22:08 14 -> /nfs | ||
36 | lr-x------ 1 root root 64 Aug 14 22:08 5 -> /nfs | ||
37 | |||
38 | I've investigated the problem and discovered that the leak happens in | ||
39 | do_umount_autofs_direct(): | ||
40 | |||
41 | - edit imk | ||
42 | The same leak is present in umount_autofs_offset() also. | ||
43 | Updated patch to cover that too. | ||
44 | - end edit | ||
45 | |||
46 | int do_umount_autofs_direct(struct autofs_point *ap, struct mnt_list | ||
47 | *mnts, struct mapent *me) | ||
48 | { | ||
49 | (...) | ||
50 | if (me->ioctlfd != -1) { | ||
51 | if (tree_is_mounted(mnts, me->key, MNTS_REAL)) { | ||
52 | error(ap->logopt, | ||
53 | "attempt to umount busy direct mount %s", | ||
54 | me->key); | ||
55 | return 1; | ||
56 | } | ||
57 | ioctlfd = me->ioctlfd; | ||
58 | } else // ioctlfd == -1 | ||
59 | ops->open(ap->logopt, &ioctlfd, me->dev, me->key); <= we open it here | ||
60 | |||
61 | if (ioctlfd >= 0) { | ||
62 | unsigned int status = 1; | ||
63 | |||
64 | rv = ops->askumount(ap->logopt, ioctlfd, &status); | ||
65 | /// at this point, rv == 0 and status == 0 | ||
66 | if (rv) { | ||
67 | char *estr = strerror_r(errno, buf, MAX_ERR_BUF); | ||
68 | error(ap->logopt, "ioctl failed: %s", estr); | ||
69 | return 1; | ||
70 | } else if (!status) { | ||
71 | /// at this point, ap->state == ST_READMAP | ||
72 | if (ap->state != ST_SHUTDOWN_FORCE) { | ||
73 | error(ap->logopt, | ||
74 | "ask umount returned busy for %s", | ||
75 | me->key); | ||
76 | return 1; <= we return here, without closing the fd | ||
77 | } else { | ||
78 | me->ioctlfd = -1; | ||
79 | ops->catatonic(ap->logopt, ioctlfd); | ||
80 | ops->close(ap->logopt, ioctlfd); | ||
81 | goto force_umount; | ||
82 | } | ||
83 | (...) | ||
84 | --- | ||
85 | CHANGELOG | 1 + | ||
86 | daemon/direct.c | 19 ++++++++++++++++--- | ||
87 | 2 files changed, 17 insertions(+), 3 deletions(-) | ||
88 | |||
89 | diff --git a/CHANGELOG b/CHANGELOG | ||
90 | index 46ef335..a7ed212 100644 | ||
91 | --- a/CHANGELOG | ||
92 | +++ b/CHANGELOG | ||
93 | @@ -30,6 +30,7 @@ | ||
94 | - workaround missing GNU versionsort extension. | ||
95 | - dont fail on master map self include. | ||
96 | - fix wildcard multi map regression. | ||
97 | +- fix file descriptor leak when reloading the daemon. | ||
98 | |||
99 | 25/07/2012 autofs-5.0.7 | ||
100 | ======================= | ||
101 | diff --git a/daemon/direct.c b/daemon/direct.c | ||
102 | index 3e09c5d..228a666 100644 | ||
103 | --- a/daemon/direct.c | ||
104 | +++ b/daemon/direct.c | ||
105 | @@ -86,7 +86,8 @@ int do_umount_autofs_direct(struct autofs_point *ap, struct mnt_list *mnts, stru | ||
106 | { | ||
107 | struct ioctl_ops *ops = get_ioctl_ops(); | ||
108 | char buf[MAX_ERR_BUF]; | ||
109 | - int ioctlfd, rv, left, retries; | ||
110 | + int ioctlfd = -1, rv, left, retries; | ||
111 | + int opened = 0; | ||
112 | |||
113 | left = umount_multi(ap, me->key, 0); | ||
114 | if (left) { | ||
115 | @@ -103,8 +104,10 @@ int do_umount_autofs_direct(struct autofs_point *ap, struct mnt_list *mnts, stru | ||
116 | return 1; | ||
117 | } | ||
118 | ioctlfd = me->ioctlfd; | ||
119 | - } else | ||
120 | + } else { | ||
121 | ops->open(ap->logopt, &ioctlfd, me->dev, me->key); | ||
122 | + opened = 1; | ||
123 | + } | ||
124 | |||
125 | if (ioctlfd >= 0) { | ||
126 | unsigned int status = 1; | ||
127 | @@ -113,12 +116,16 @@ int do_umount_autofs_direct(struct autofs_point *ap, struct mnt_list *mnts, stru | ||
128 | if (rv) { | ||
129 | char *estr = strerror_r(errno, buf, MAX_ERR_BUF); | ||
130 | error(ap->logopt, "ioctl failed: %s", estr); | ||
131 | + if (opened && ioctlfd != -1) | ||
132 | + ops->close(ap->logopt, ioctlfd); | ||
133 | return 1; | ||
134 | } else if (!status) { | ||
135 | if (ap->state != ST_SHUTDOWN_FORCE) { | ||
136 | error(ap->logopt, | ||
137 | "ask umount returned busy for %s", | ||
138 | me->key); | ||
139 | + if (opened && ioctlfd != -1) | ||
140 | + ops->close(ap->logopt, ioctlfd); | ||
141 | return 1; | ||
142 | } else { | ||
143 | me->ioctlfd = -1; | ||
144 | @@ -536,7 +543,8 @@ int umount_autofs_offset(struct autofs_point *ap, struct mapent *me) | ||
145 | { | ||
146 | struct ioctl_ops *ops = get_ioctl_ops(); | ||
147 | char buf[MAX_ERR_BUF]; | ||
148 | - int ioctlfd, rv = 1, retries; | ||
149 | + int ioctlfd = -1, rv = 1, retries; | ||
150 | + int opened = 0; | ||
151 | |||
152 | if (me->ioctlfd != -1) { | ||
153 | if (is_mounted(_PATH_MOUNTED, me->key, MNTS_REAL)) { | ||
154 | @@ -554,6 +562,7 @@ int umount_autofs_offset(struct autofs_point *ap, struct mapent *me) | ||
155 | return 0; | ||
156 | } | ||
157 | ops->open(ap->logopt, &ioctlfd, me->dev, me->key); | ||
158 | + opened = 1; | ||
159 | } | ||
160 | |||
161 | if (ioctlfd >= 0) { | ||
162 | @@ -563,6 +572,8 @@ int umount_autofs_offset(struct autofs_point *ap, struct mapent *me) | ||
163 | if (rv) { | ||
164 | char *estr = strerror_r(errno, buf, MAX_ERR_BUF); | ||
165 | logerr("ioctl failed: %s", estr); | ||
166 | + if (opened && ioctlfd != -1) | ||
167 | + ops->close(ap->logopt, ioctlfd); | ||
168 | return 1; | ||
169 | } else if (!status) { | ||
170 | if (ap->state != ST_SHUTDOWN_FORCE) { | ||
171 | @@ -570,6 +581,8 @@ int umount_autofs_offset(struct autofs_point *ap, struct mapent *me) | ||
172 | error(ap->logopt, | ||
173 | "ask umount returned busy for %s", | ||
174 | me->key); | ||
175 | + if (opened && ioctlfd != -1) | ||
176 | + ops->close(ap->logopt, ioctlfd); | ||
177 | return 1; | ||
178 | } else { | ||
179 | me->ioctlfd = -1; | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-init-script-status-return.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-init-script-status-return.patch new file mode 100644 index 000000000..a08d62fc3 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-init-script-status-return.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | autofs-5.0.7 - fix init script status return | ||
2 | |||
3 | From: Ian Kent <ikent@redhat.com> | ||
4 | |||
5 | The patch that added the piddir to configure to fix incorrect init | ||
6 | script status() function returns failed to actually return the value | ||
7 | to the user. | ||
8 | --- | ||
9 | |||
10 | CHANGELOG | 1 + | ||
11 | redhat/autofs.init.in | 2 +- | ||
12 | 2 files changed, 2 insertions(+), 1 deletions(-) | ||
13 | |||
14 | |||
15 | diff --git a/CHANGELOG b/CHANGELOG | ||
16 | index 76c1f73..5bcb1af 100644 | ||
17 | --- a/CHANGELOG | ||
18 | +++ b/CHANGELOG | ||
19 | @@ -19,6 +19,7 @@ | ||
20 | - Allow nsswitch.conf to not contain "automount:" lines. | ||
21 | - fix nobind man page description. | ||
22 | - fix submount offset delete. | ||
23 | +- fix init script status return. | ||
24 | |||
25 | 25/07/2012 autofs-5.0.7 | ||
26 | ======================= | ||
27 | diff --git a/redhat/autofs.init.in b/redhat/autofs.init.in | ||
28 | index fe18b3e..9d008ff 100644 | ||
29 | --- a/redhat/autofs.init.in | ||
30 | +++ b/redhat/autofs.init.in | ||
31 | @@ -172,7 +172,7 @@ RETVAL=0 | ||
32 | case "$1" in | ||
33 | status) | ||
34 | status -p @@autofspiddir@@/autofs.pid -l autofs $prog | ||
35 | - exit 0; | ||
36 | + exit $?; | ||
37 | ;; | ||
38 | usage) | ||
39 | usage_message | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-libtirpc-build-option.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-libtirpc-build-option.patch new file mode 100644 index 000000000..8ad2afacf --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-libtirpc-build-option.patch | |||
@@ -0,0 +1,66 @@ | |||
1 | autofs-5.0.7 - fix libtirpc build option | ||
2 | |||
3 | From: Ian Kent <raven@themaw.net> | ||
4 | |||
5 | |||
6 | --- | ||
7 | CHANGELOG | 1 + | ||
8 | autofs.spec | 17 ++++++++++++++++- | ||
9 | 2 files changed, 17 insertions(+), 1 deletion(-) | ||
10 | |||
11 | diff --git a/CHANGELOG b/CHANGELOG | ||
12 | index e848bcd..b6b2679 100644 | ||
13 | --- a/CHANGELOG | ||
14 | +++ b/CHANGELOG | ||
15 | @@ -34,6 +34,7 @@ | ||
16 | - depricate nosymlink pseudo option. | ||
17 | - add symlink pseudo option. | ||
18 | - fix requires in spec file. | ||
19 | +- fix libtirpc build option to require libtirpc-devel if needed. | ||
20 | |||
21 | 25/07/2012 autofs-5.0.7 | ||
22 | ======================= | ||
23 | diff --git a/autofs.spec b/autofs.spec | ||
24 | index 703f7a9..f77acc1 100644 | ||
25 | --- a/autofs.spec | ||
26 | +++ b/autofs.spec | ||
27 | @@ -12,6 +12,10 @@ | ||
28 | # disable them. | ||
29 | %define with_systemd %{?_without_systemd: 0} %{?!_without_systemd: 1} | ||
30 | |||
31 | +# Use --without libtirpc in your rpmbuild command or force values to 0 to | ||
32 | +# disable them. | ||
33 | +%define with_libtirpc %{?_without_libtirpc: 0} %{?!_without_libtirpc: 1} | ||
34 | + | ||
35 | Summary: A tool from automatically mounting and umounting filesystems. | ||
36 | Name: autofs | ||
37 | %define version 5.0.7 | ||
38 | @@ -25,6 +29,9 @@ Buildroot: %{_tmppath}/%{name}-tmp | ||
39 | %if %{with_systemd} | ||
40 | BuildRequires: systemd-units | ||
41 | %endif | ||
42 | +%if %{with_libtirpc} | ||
43 | +BuildRequires: libtirpc-devel | ||
44 | +%endif | ||
45 | BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, cyrus-sasl-devel | ||
46 | Requires: chkconfig | ||
47 | Requires: /bin/bash mktemp sed textutils sh-utils grep /bin/ps | ||
48 | @@ -72,9 +79,17 @@ echo %{version}-%{release} > .version | ||
49 | %define _unitdir %{?_unitdir:/lib/systemd/system} | ||
50 | %define systemd_configure_arg --with-systemd | ||
51 | %endif | ||
52 | +%if %{with_libtirpc} | ||
53 | + %define libtirpc_configure_arg --with-libtirpc | ||
54 | +%endif | ||
55 | |||
56 | %build | ||
57 | -CFLAGS="$RPM_OPT_FLAGS -Wall" ./configure --libdir=%{_libdir} --disable-mount-locking --enable-ignore-busy --with-libtirpc %{?systemd_configure_arg:} | ||
58 | +CFLAGS="$RPM_OPT_FLAGS -Wall" \ | ||
59 | +./configure --libdir=%{_libdir} \ | ||
60 | + --disable-mount-locking \ | ||
61 | + --enable-ignore-busy \ | ||
62 | + %{?systemd_configure_arg:} \ | ||
63 | + %{?libtirpc_configure_arg:} | ||
64 | CFLAGS="$RPM_OPT_FLAGS -Wall" make initdir=/etc/rc.d/init.d DONTSTRIP=1 | ||
65 | |||
66 | %install | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-map-entry-duplicate-offset-detection.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-map-entry-duplicate-offset-detection.patch new file mode 100644 index 000000000..126d9a25b --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-map-entry-duplicate-offset-detection.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | autofs-5.0.7 - fix map entry duplicate offset detection | ||
2 | |||
3 | From: Ian Kent <raven@themaw.net> | ||
4 | |||
5 | Recent changes broke the detection of duplicate offsets in map entries. | ||
6 | --- | ||
7 | |||
8 | CHANGELOG | 1 + | ||
9 | lib/cache.c | 2 +- | ||
10 | 2 files changed, 2 insertions(+), 1 deletions(-) | ||
11 | |||
12 | |||
13 | diff --git a/CHANGELOG b/CHANGELOG | ||
14 | index 8f6bb3a..bd0dd82 100644 | ||
15 | --- a/CHANGELOG | ||
16 | +++ b/CHANGELOG | ||
17 | @@ -15,6 +15,7 @@ | ||
18 | - fix recursive mount deadlock. | ||
19 | - increase file map read buffer size. | ||
20 | - handle new location of systemd. | ||
21 | +- fix map entry duplicate offset detection. | ||
22 | |||
23 | 25/07/2012 autofs-5.0.7 | ||
24 | ======================= | ||
25 | diff --git a/lib/cache.c b/lib/cache.c | ||
26 | index 9179ad5..1e05a99 100644 | ||
27 | --- a/lib/cache.c | ||
28 | +++ b/lib/cache.c | ||
29 | @@ -659,7 +659,7 @@ int cache_update_offset(struct mapent_cache *mc, const char *mkey, const char *k | ||
30 | |||
31 | me = cache_lookup_distinct(mc, key); | ||
32 | if (me && me->age == age) { | ||
33 | - if (me->multi != owner) | ||
34 | + if (me->multi == owner) | ||
35 | return CHE_DUPLICATE; | ||
36 | } | ||
37 | |||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-nobind-man-page-description.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-nobind-man-page-description.patch new file mode 100644 index 000000000..41328a0e4 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-nobind-man-page-description.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | autofs-5.0.7 - fix nobind man page description | ||
2 | |||
3 | From: Ian Kent <raven@themaw.net> | ||
4 | |||
5 | Update auto.master(5) to better describe the behavior of the "nobind" | ||
6 | option when used with direct mounts maps. | ||
7 | --- | ||
8 | |||
9 | CHANGELOG | 1 + | ||
10 | man/auto.master.5.in | 10 +++++++--- | ||
11 | 2 files changed, 8 insertions(+), 3 deletions(-) | ||
12 | |||
13 | |||
14 | diff --git a/CHANGELOG b/CHANGELOG | ||
15 | index 16ac2a0..7eb7235 100644 | ||
16 | --- a/CHANGELOG | ||
17 | +++ b/CHANGELOG | ||
18 | @@ -17,6 +17,7 @@ | ||
19 | - handle new location of systemd. | ||
20 | - fix map entry duplicate offset detection. | ||
21 | - Allow nsswitch.conf to not contain "automount:" lines. | ||
22 | +- fix nobind man page description. | ||
23 | |||
24 | 25/07/2012 autofs-5.0.7 | ||
25 | ======================= | ||
26 | diff --git a/man/auto.master.5.in b/man/auto.master.5.in | ||
27 | index 21d7544..8007542 100644 | ||
28 | --- a/man/auto.master.5.in | ||
29 | +++ b/man/auto.master.5.in | ||
30 | @@ -151,9 +151,13 @@ can't be mounted. | ||
31 | This is an autofs specific option that is a pseudo mount option and | ||
32 | so is given without a leading dash. It may be used either in the master | ||
33 | map entry (so it effects all the map entries) or with individual map | ||
34 | -entries to prevent bind mounting of local NFS filesystems. Bind mounting | ||
35 | -of NFS file systems can also be prevented for specific map entrys by | ||
36 | -adding the "port=" mount option to the entries. | ||
37 | +entries to prevent bind mounting of local NFS filesystems. For direct | ||
38 | +mount maps the option is only effective if specified on the first direct | ||
39 | +map entry and is applied to all direct mount maps in the master map. It | ||
40 | +is ignored if given on subsequent direct map entries. It may be used | ||
41 | +on individual map entries of both types. Bind mounting of NFS file | ||
42 | +systems can also be prevented for specific map entrys by adding the | ||
43 | +"port=" mount option to the entries. | ||
44 | .TP | ||
45 | .I "\-r, \-\-random-multimount-selection" | ||
46 | Enables the use of ramdom selection when choosing a host from a | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-requires-in-spec-file.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-requires-in-spec-file.patch new file mode 100644 index 000000000..404c84854 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-requires-in-spec-file.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | autofs-5.0.7 - fix requires in spec file | ||
2 | |||
3 | From: Ian Kent <raven@themaw.net> | ||
4 | |||
5 | Fix the use of depricated reqires in tar spec file. | ||
6 | --- | ||
7 | CHANGELOG | 1 + | ||
8 | autofs.spec | 4 ++-- | ||
9 | 2 files changed, 3 insertions(+), 2 deletions(-) | ||
10 | |||
11 | diff --git a/CHANGELOG b/CHANGELOG | ||
12 | index 247d334..e848bcd 100644 | ||
13 | --- a/CHANGELOG | ||
14 | +++ b/CHANGELOG | ||
15 | @@ -33,6 +33,7 @@ | ||
16 | - fix file descriptor leak when reloading the daemon. | ||
17 | - depricate nosymlink pseudo option. | ||
18 | - add symlink pseudo option. | ||
19 | +- fix requires in spec file. | ||
20 | |||
21 | 25/07/2012 autofs-5.0.7 | ||
22 | ======================= | ||
23 | diff --git a/autofs.spec b/autofs.spec | ||
24 | index b8a3b7a..703f7a9 100644 | ||
25 | --- a/autofs.spec | ||
26 | +++ b/autofs.spec | ||
27 | @@ -25,8 +25,8 @@ Buildroot: %{_tmppath}/%{name}-tmp | ||
28 | %if %{with_systemd} | ||
29 | BuildRequires: systemd-units | ||
30 | %endif | ||
31 | -BuildPrereq: autoconf, hesiod-devel, openldap-devel, bison, flex, cyrus-sasl-devel | ||
32 | -Prereq: chkconfig | ||
33 | +BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, cyrus-sasl-devel | ||
34 | +Requires: chkconfig | ||
35 | Requires: /bin/bash mktemp sed textutils sh-utils grep /bin/ps | ||
36 | %if %{with_systemd} | ||
37 | Requires(post): systemd-sysv | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-submount-offset-delete.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-submount-offset-delete.patch new file mode 100644 index 000000000..b38e21433 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-submount-offset-delete.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | autofs-5.0.7 - fix submount offset delete | ||
2 | |||
3 | From: Ian Kent <ikent@redhat.com> | ||
4 | |||
5 | As part of the implementation to allow for limited update of | ||
6 | the internal hosts map by using a HUP signal some code that | ||
7 | deleted any offset entries from the cache on lookup was removed | ||
8 | as it appeared to not be needed. | ||
9 | |||
10 | There is however a case where it is needed to avoid a duplicate | ||
11 | cache entry failure on lookup. | ||
12 | --- | ||
13 | |||
14 | CHANGELOG | 1 + | ||
15 | daemon/automount.c | 4 ++-- | ||
16 | 2 files changed, 3 insertions(+), 2 deletions(-) | ||
17 | |||
18 | |||
19 | diff --git a/CHANGELOG b/CHANGELOG | ||
20 | index 7eb7235..76c1f73 100644 | ||
21 | --- a/CHANGELOG | ||
22 | +++ b/CHANGELOG | ||
23 | @@ -18,6 +18,7 @@ | ||
24 | - fix map entry duplicate offset detection. | ||
25 | - Allow nsswitch.conf to not contain "automount:" lines. | ||
26 | - fix nobind man page description. | ||
27 | +- fix submount offset delete. | ||
28 | |||
29 | 25/07/2012 autofs-5.0.7 | ||
30 | ======================= | ||
31 | diff --git a/daemon/automount.c b/daemon/automount.c | ||
32 | index e56f9e1..4a3eb3d 100644 | ||
33 | --- a/daemon/automount.c | ||
34 | +++ b/daemon/automount.c | ||
35 | @@ -544,8 +544,8 @@ int umount_multi(struct autofs_point *ap, const char *path, int incl) | ||
36 | * If we are a submount we need to umount any offsets our | ||
37 | * parent may have mounted over top of us. | ||
38 | */ | ||
39 | - /*if (ap->submount) | ||
40 | - left += umount_subtree_mounts(ap->parent, path, is_autofs_fs);*/ | ||
41 | + if (ap->submount) | ||
42 | + left += umount_subtree_mounts(ap->parent, path, is_autofs_fs); | ||
43 | |||
44 | left += umount_subtree_mounts(ap, path, is_autofs_fs); | ||
45 | |||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-systemd-unidir-in-spec-file.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-systemd-unidir-in-spec-file.patch new file mode 100644 index 000000000..d856faf42 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-systemd-unidir-in-spec-file.patch | |||
@@ -0,0 +1,72 @@ | |||
1 | autofs-5.0.7 - fix systemd unidir in spec file | ||
2 | |||
3 | From: Ian Kent <raven@themaw.net> | ||
4 | |||
5 | |||
6 | --- | ||
7 | CHANGELOG | 1 + | ||
8 | autofs.spec | 16 ++++++++-------- | ||
9 | 2 files changed, 9 insertions(+), 8 deletions(-) | ||
10 | |||
11 | diff --git a/CHANGELOG b/CHANGELOG | ||
12 | index b6b2679..ecdea0b 100644 | ||
13 | --- a/CHANGELOG | ||
14 | +++ b/CHANGELOG | ||
15 | @@ -35,6 +35,7 @@ | ||
16 | - add symlink pseudo option. | ||
17 | - fix requires in spec file. | ||
18 | - fix libtirpc build option to require libtirpc-devel if needed. | ||
19 | +- fix systemd unidir in spec file. | ||
20 | |||
21 | 25/07/2012 autofs-5.0.7 | ||
22 | ======================= | ||
23 | diff --git a/autofs.spec b/autofs.spec | ||
24 | index f77acc1..a768e44 100644 | ||
25 | --- a/autofs.spec | ||
26 | +++ b/autofs.spec | ||
27 | @@ -76,7 +76,7 @@ inkludera n | ||
28 | %setup -q | ||
29 | echo %{version}-%{release} > .version | ||
30 | %if %{with_systemd} | ||
31 | - %define _unitdir %{?_unitdir:/lib/systemd/system} | ||
32 | + %define unitdir %{?_unitdir:/lib/systemd/system} | ||
33 | %define systemd_configure_arg --with-systemd | ||
34 | %endif | ||
35 | %if %{with_libtirpc} | ||
36 | @@ -95,7 +95,7 @@ CFLAGS="$RPM_OPT_FLAGS -Wall" make initdir=/etc/rc.d/init.d DONTSTRIP=1 | ||
37 | %install | ||
38 | rm -rf $RPM_BUILD_ROOT | ||
39 | %if %{with_systemd} | ||
40 | -install -d -m 755 $RPM_BUILD_ROOT%{_unitdir} | ||
41 | +install -d -m 755 $RPM_BUILD_ROOT%{unitdir} | ||
42 | %else | ||
43 | mkdir -p -m755 $RPM_BUILD_ROOT/etc/rc.d/init.d | ||
44 | %endif | ||
45 | @@ -109,9 +109,13 @@ make install mandir=%{_mandir} initdir=/etc/rc.d/init.d INSTALLROOT=$RPM_BUILD_R | ||
46 | echo make -C redhat | ||
47 | make -C redhat | ||
48 | %if %{with_systemd} | ||
49 | -install -m 644 redhat/autofs.service $RPM_BUILD_ROOT%{_unitdir}/autofs.service | ||
50 | +# Configure can get this wrong when the unit files appear under /lib and /usr/lib | ||
51 | +find $RPM_BUILD_ROOT -type f -name autofs.service -exec rm -f {} \; | ||
52 | +install -m 644 redhat/autofs.service $RPM_BUILD_ROOT%{unitdir}/autofs.service | ||
53 | +%define init_file_name %{unitdir}/autofs.service | ||
54 | %else | ||
55 | install -m 755 redhat/autofs.init $RPM_BUILD_ROOT/etc/rc.d/init.d/autofs | ||
56 | +%define init_file_name /etc/rc.d/init.d/autofs | ||
57 | %endif | ||
58 | install -m 644 redhat/autofs.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/autofs | ||
59 | |||
60 | @@ -170,11 +174,7 @@ fi | ||
61 | %files | ||
62 | %defattr(-,root,root) | ||
63 | %doc CREDITS CHANGELOG INSTALL COPY* README* samples/ldap* samples/autofs.schema samples/autofs_ldap_auth.conf | ||
64 | -%if %{with_systemd} | ||
65 | -%{_unitdir}/autofs.service | ||
66 | -%else | ||
67 | -%config /etc/rc.d/init.d/autofs | ||
68 | -%endif | ||
69 | +%config %{init_file_name} | ||
70 | %config(noreplace) /etc/auto.master | ||
71 | %config(noreplace,missingok) /etc/auto.misc | ||
72 | %config(noreplace,missingok) /etc/auto.net | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-use-get_proximity-without-libtirpc.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-use-get_proximity-without-libtirpc.patch new file mode 100644 index 000000000..74ed8fa64 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-use-get_proximity-without-libtirpc.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | autofs-5.0.7 - fix use get_proximity() without libtirpc | ||
2 | |||
3 | From: Ian Kent <raven@themaw.net> | ||
4 | |||
5 | If autofs is not using libtirpc and there are any configured IPv6 | ||
6 | interfaces then get_proximity() will fail with PROXIMITY_UNSUPPORTED. | ||
7 | |||
8 | In this case when checking interfaces the IPv6 interfaces need to be | ||
9 | ignored. | ||
10 | --- | ||
11 | |||
12 | CHANGELOG | 1 + | ||
13 | modules/replicated.c | 8 ++------ | ||
14 | 2 files changed, 3 insertions(+), 6 deletions(-) | ||
15 | |||
16 | |||
17 | diff --git a/CHANGELOG b/CHANGELOG | ||
18 | index 5bcb1af..460bd27 100644 | ||
19 | --- a/CHANGELOG | ||
20 | +++ b/CHANGELOG | ||
21 | @@ -20,6 +20,7 @@ | ||
22 | - fix nobind man page description. | ||
23 | - fix submount offset delete. | ||
24 | - fix init script status return. | ||
25 | +- fix use get_proximity() without libtirpc. | ||
26 | |||
27 | 25/07/2012 autofs-5.0.7 | ||
28 | ======================= | ||
29 | diff --git a/modules/replicated.c b/modules/replicated.c | ||
30 | index bd6003b..6b96320 100644 | ||
31 | --- a/modules/replicated.c | ||
32 | +++ b/modules/replicated.c | ||
33 | @@ -184,9 +184,7 @@ static unsigned int get_proximity(struct sockaddr *host_addr) | ||
34 | break; | ||
35 | |||
36 | case AF_INET6: | ||
37 | -#ifndef WITH_LIBTIRPC | ||
38 | - return PROXIMITY_UNSUPPORTED; | ||
39 | -#else | ||
40 | +#ifdef WITH_LIBTIRPC | ||
41 | if (host_addr->sa_family == AF_INET) | ||
42 | break; | ||
43 | if6_addr = (struct sockaddr_in6 *) this->ifa_addr; | ||
44 | @@ -251,9 +249,7 @@ static unsigned int get_proximity(struct sockaddr *host_addr) | ||
45 | break; | ||
46 | |||
47 | case AF_INET6: | ||
48 | -#ifndef WITH_LIBTIRPC | ||
49 | - return PROXIMITY_UNSUPPORTED; | ||
50 | -#else | ||
51 | +#ifdef WITH_LIBTIRPC | ||
52 | if (host_addr->sa_family == AF_INET) | ||
53 | break; | ||
54 | if6_addr = (struct sockaddr_in6 *) this->ifa_addr; | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-wildcard-multi-map-regression.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-wildcard-multi-map-regression.patch new file mode 100644 index 000000000..44e4a18e3 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-wildcard-multi-map-regression.patch | |||
@@ -0,0 +1,225 @@ | |||
1 | autofs-5.0.7 - fix wildcard multi map regression | ||
2 | |||
3 | From: Ian Kent <raven@themaw.net> | ||
4 | |||
5 | A recent patch that removed code to add the current map entry when | ||
6 | being parsed if it didn't already exist cause wildcard indirect | ||
7 | multi-mount map entries to fail to mount. | ||
8 | |||
9 | Indirect multi-mount map entries need the entry matched by a wildcard | ||
10 | lookup to be added to the map entry cache because subsequent operations | ||
11 | expect a distinct map entry to be present or they will fail. This is | ||
12 | what the code that was removed did but it did so in the wrong place | ||
13 | which caused a deadlock situation. | ||
14 | --- | ||
15 | CHANGELOG | 1 + | ||
16 | modules/lookup_file.c | 23 ++++++++++++++++------- | ||
17 | modules/lookup_ldap.c | 19 +++++++++++++++---- | ||
18 | modules/lookup_nisplus.c | 21 ++++++++++++++++----- | ||
19 | modules/lookup_sss.c | 17 ++++++++++++++--- | ||
20 | modules/lookup_yp.c | 21 ++++++++++++++++----- | ||
21 | 6 files changed, 78 insertions(+), 24 deletions(-) | ||
22 | |||
23 | diff --git a/CHANGELOG b/CHANGELOG | ||
24 | index 97d6f48..46ef335 100644 | ||
25 | --- a/CHANGELOG | ||
26 | +++ b/CHANGELOG | ||
27 | @@ -29,6 +29,7 @@ | ||
28 | - modules/replicated.c: use sin6_addr.s6_addr32. | ||
29 | - workaround missing GNU versionsort extension. | ||
30 | - dont fail on master map self include. | ||
31 | +- fix wildcard multi map regression. | ||
32 | |||
33 | 25/07/2012 autofs-5.0.7 | ||
34 | ======================= | ||
35 | diff --git a/modules/lookup_file.c b/modules/lookup_file.c | ||
36 | index f37bed9..65e5ee6 100644 | ||
37 | --- a/modules/lookup_file.c | ||
38 | +++ b/modules/lookup_file.c | ||
39 | @@ -1040,7 +1040,7 @@ int lookup_mount(struct autofs_point *ap, const char *name, int name_len, void * | ||
40 | return NSS_STATUS_UNAVAIL; | ||
41 | } | ||
42 | |||
43 | - cache_readlock(mc); | ||
44 | + cache_writelock(mc); | ||
45 | me = cache_lookup_first(mc); | ||
46 | if (me && st.st_mtime <= me->age) { | ||
47 | /* | ||
48 | @@ -1082,7 +1082,7 @@ int lookup_mount(struct autofs_point *ap, const char *name, int name_len, void * | ||
49 | } | ||
50 | } | ||
51 | |||
52 | - cache_readlock(mc); | ||
53 | + cache_writelock(mc); | ||
54 | do_cache_lookup: | ||
55 | me = cache_lookup(mc, key); | ||
56 | /* | ||
57 | @@ -1098,11 +1098,20 @@ do_cache_lookup: | ||
58 | if (!me) | ||
59 | me = cache_lookup_distinct(mc, "*"); | ||
60 | } | ||
61 | - if (me && me->mapent && (me->source == source || *me->key == '/')) { | ||
62 | - pthread_cleanup_push(cache_lock_cleanup, mc); | ||
63 | - strcpy(mapent_buf, me->mapent); | ||
64 | - mapent = mapent_buf; | ||
65 | - pthread_cleanup_pop(0); | ||
66 | + if (me && me->mapent) { | ||
67 | + /* | ||
68 | + * Add wildcard match for later validation checks and | ||
69 | + * negative cache lookups. | ||
70 | + */ | ||
71 | + if (ap->type == LKP_INDIRECT && *me->key == '*') { | ||
72 | + ret = cache_update(mc, source, key, me->mapent, me->age); | ||
73 | + if (!(ret & (CHE_OK | CHE_UPDATED))) | ||
74 | + me = NULL; | ||
75 | + } | ||
76 | + if (me && (me->source == source || *me->key == '/')) { | ||
77 | + strcpy(mapent_buf, me->mapent); | ||
78 | + mapent = mapent_buf; | ||
79 | + } | ||
80 | } | ||
81 | cache_unlock(mc); | ||
82 | |||
83 | diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c | ||
84 | index 431e50d..83e3215 100644 | ||
85 | --- a/modules/lookup_ldap.c | ||
86 | +++ b/modules/lookup_ldap.c | ||
87 | @@ -2969,7 +2969,7 @@ int lookup_mount(struct autofs_point *ap, const char *name, int name_len, void * | ||
88 | return status; | ||
89 | } | ||
90 | |||
91 | - cache_readlock(mc); | ||
92 | + cache_writelock(mc); | ||
93 | me = cache_lookup(mc, key); | ||
94 | /* Stale mapent => check for entry in alternate source or wildcard */ | ||
95 | if (me && !me->mapent) { | ||
96 | @@ -2979,9 +2979,20 @@ int lookup_mount(struct autofs_point *ap, const char *name, int name_len, void * | ||
97 | if (!me) | ||
98 | me = cache_lookup_distinct(mc, "*"); | ||
99 | } | ||
100 | - if (me && me->mapent && (me->source == source || *me->key == '/')) { | ||
101 | - strcpy(mapent_buf, me->mapent); | ||
102 | - mapent = mapent_buf; | ||
103 | + if (me && me->mapent) { | ||
104 | + /* | ||
105 | + * Add wildcard match for later validation checks and | ||
106 | + * negative cache lookups. | ||
107 | + */ | ||
108 | + if (ap->type == LKP_INDIRECT && *me->key == '*') { | ||
109 | + ret = cache_update(mc, source, key, me->mapent, me->age); | ||
110 | + if (!(ret & (CHE_OK | CHE_UPDATED))) | ||
111 | + me = NULL; | ||
112 | + } | ||
113 | + if (me && (me->source == source || *me->key == '/')) { | ||
114 | + strcpy(mapent_buf, me->mapent); | ||
115 | + mapent = mapent_buf; | ||
116 | + } | ||
117 | } | ||
118 | cache_unlock(mc); | ||
119 | |||
120 | diff --git a/modules/lookup_nisplus.c b/modules/lookup_nisplus.c | ||
121 | index 9fced96..8237a1e 100644 | ||
122 | --- a/modules/lookup_nisplus.c | ||
123 | +++ b/modules/lookup_nisplus.c | ||
124 | @@ -561,7 +561,7 @@ int lookup_mount(struct autofs_point *ap, const char *name, int name_len, void * | ||
125 | return status; | ||
126 | } | ||
127 | |||
128 | - cache_readlock(mc); | ||
129 | + cache_writelock(mc); | ||
130 | me = cache_lookup(mc, key); | ||
131 | /* Stale mapent => check for entry in alternate source or wildcard */ | ||
132 | if (me && !me->mapent) { | ||
133 | @@ -571,10 +571,21 @@ int lookup_mount(struct autofs_point *ap, const char *name, int name_len, void * | ||
134 | if (!me) | ||
135 | me = cache_lookup_distinct(mc, "*"); | ||
136 | } | ||
137 | - if (me && me->mapent && (me->source == source || *me->key == '/')) { | ||
138 | - mapent_len = strlen(me->mapent); | ||
139 | - mapent = malloc(mapent_len + 1); | ||
140 | - strcpy(mapent, me->mapent); | ||
141 | + if (me && me->mapent) { | ||
142 | + /* | ||
143 | + * Add wildcard match for later validation checks and | ||
144 | + * negative cache lookups. | ||
145 | + */ | ||
146 | + if (ap->type == LKP_INDIRECT && *me->key == '*') { | ||
147 | + ret = cache_update(mc, source, key, me->mapent, me->age); | ||
148 | + if (!(ret & (CHE_OK | CHE_UPDATED))) | ||
149 | + me = NULL; | ||
150 | + } | ||
151 | + if (me && (me->source == source || *me->key == '/')) { | ||
152 | + mapent_len = strlen(me->mapent); | ||
153 | + mapent = malloc(mapent_len + 1); | ||
154 | + strcpy(mapent, me->mapent); | ||
155 | + } | ||
156 | } | ||
157 | cache_unlock(mc); | ||
158 | |||
159 | diff --git a/modules/lookup_sss.c b/modules/lookup_sss.c | ||
160 | index e0b84cc..5c2ed0a 100644 | ||
161 | --- a/modules/lookup_sss.c | ||
162 | +++ b/modules/lookup_sss.c | ||
163 | @@ -645,9 +645,20 @@ int lookup_mount(struct autofs_point *ap, const char *name, int name_len, void * | ||
164 | if (!me) | ||
165 | me = cache_lookup_distinct(mc, "*"); | ||
166 | } | ||
167 | - if (me && me->mapent && (me->source == source || *me->key == '/')) { | ||
168 | - strcpy(mapent_buf, me->mapent); | ||
169 | - mapent = mapent_buf; | ||
170 | + if (me && me->mapent) { | ||
171 | + /* | ||
172 | + * Add wildcard match for later validation checks and | ||
173 | + * negative cache lookups. | ||
174 | + */ | ||
175 | + if (ap->type == LKP_INDIRECT && *me->key == '*') { | ||
176 | + ret = cache_update(mc, source, key, me->mapent, me->age); | ||
177 | + if (!(ret & (CHE_OK | CHE_UPDATED))) | ||
178 | + me = NULL; | ||
179 | + } | ||
180 | + if (me && (me->source == source || *me->key == '/')) { | ||
181 | + strcpy(mapent_buf, me->mapent); | ||
182 | + mapent = mapent_buf; | ||
183 | + } | ||
184 | } | ||
185 | cache_unlock(mc); | ||
186 | |||
187 | diff --git a/modules/lookup_yp.c b/modules/lookup_yp.c | ||
188 | index 720df2e..a716e1f 100644 | ||
189 | --- a/modules/lookup_yp.c | ||
190 | +++ b/modules/lookup_yp.c | ||
191 | @@ -662,7 +662,7 @@ int lookup_mount(struct autofs_point *ap, const char *name, int name_len, void * | ||
192 | return status; | ||
193 | } | ||
194 | |||
195 | - cache_readlock(mc); | ||
196 | + cache_writelock(mc); | ||
197 | me = cache_lookup(mc, key); | ||
198 | /* Stale mapent => check for entry in alternate source or wildcard */ | ||
199 | if (me && !me->mapent) { | ||
200 | @@ -672,10 +672,21 @@ int lookup_mount(struct autofs_point *ap, const char *name, int name_len, void * | ||
201 | if (!me) | ||
202 | me = cache_lookup_distinct(mc, "*"); | ||
203 | } | ||
204 | - if (me && me->mapent && (me->source == source || *me->key == '/')) { | ||
205 | - mapent_len = strlen(me->mapent); | ||
206 | - mapent = alloca(mapent_len + 1); | ||
207 | - strcpy(mapent, me->mapent); | ||
208 | + if (me && me->mapent) { | ||
209 | + /* | ||
210 | + * Add wildcard match for later validation checks and | ||
211 | + * negative cache lookups. | ||
212 | + */ | ||
213 | + if (ap->type == LKP_INDIRECT && *me->key == '*') { | ||
214 | + ret = cache_update(mc, source, key, me->mapent, me->age); | ||
215 | + if (!(ret & (CHE_OK | CHE_UPDATED))) | ||
216 | + me = NULL; | ||
217 | + } | ||
218 | + if (me && (me->source == source || *me->key == '/')) { | ||
219 | + mapent_len = strlen(me->mapent); | ||
220 | + mapent = alloca(mapent_len + 1); | ||
221 | + strcpy(mapent, me->mapent); | ||
222 | + } | ||
223 | } | ||
224 | cache_unlock(mc); | ||
225 | |||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-lib-defaults-use-WITH_LDAP-conditional-around-LDAP-types.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-lib-defaults-use-WITH_LDAP-conditional-around-LDAP-types.patch new file mode 100644 index 000000000..22e0418e5 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-lib-defaults-use-WITH_LDAP-conditional-around-LDAP-types.patch | |||
@@ -0,0 +1,448 @@ | |||
1 | autofs-5.0.7 - lib/defaults.c: use WITH_LDAP conditional around LDAP types | ||
2 | |||
3 | From: Chris Packham <chris.packham@alliedtelesis.co.nz> | ||
4 | |||
5 | Wrap the inclusion of lookup_ldap.h and functions that use ldap_uri or | ||
6 | ldap_schema with the WITH_LDAP conditional. WITH_LDAP is set by the | ||
7 | configure step when LDAP support is not desired. This also allows | ||
8 | compilation on a system that doesn't have any LDAP libraries. | ||
9 | --- | ||
10 | |||
11 | CHANGELOG | 1 | ||
12 | include/defaults.h | 14 +- | ||
13 | include/lookup_ldap.h | 1 | ||
14 | lib/defaults.c | 325 +++++++++++++++++++++++++------------------------ | ||
15 | modules/lookup_ldap.c | 1 | ||
16 | 5 files changed, 175 insertions(+), 167 deletions(-) | ||
17 | |||
18 | |||
19 | diff --git a/CHANGELOG b/CHANGELOG | ||
20 | index ba1d65b..1130db6 100644 | ||
21 | --- a/CHANGELOG | ||
22 | +++ b/CHANGELOG | ||
23 | @@ -24,6 +24,7 @@ | ||
24 | - don't use dirent d_type to filter out files in scandir() | ||
25 | - don't schedule new alarms after readmap. | ||
26 | - use numeric protocol ids instead of protoent structs. | ||
27 | +- lib/defaults.c: use WITH_LDAP conditional around LDAP types. | ||
28 | |||
29 | 25/07/2012 autofs-5.0.7 | ||
30 | ======================= | ||
31 | diff --git a/include/defaults.h b/include/defaults.h | ||
32 | index cda2174..871e14b 100644 | ||
33 | --- a/include/defaults.h | ||
34 | +++ b/include/defaults.h | ||
35 | @@ -44,8 +44,16 @@ | ||
36 | |||
37 | #define DEFAULT_MAP_HASH_TABLE_SIZE 1024 | ||
38 | |||
39 | +#ifdef WITH_LDAP | ||
40 | struct ldap_schema; | ||
41 | struct ldap_searchdn; | ||
42 | +void defaults_free_uris(struct list_head *); | ||
43 | +struct list_head *defaults_get_uris(void); | ||
44 | +struct ldap_schema *defaults_get_default_schema(void); | ||
45 | +void defaults_free_searchdns(struct ldap_searchdn *); | ||
46 | +struct ldap_searchdn *defaults_get_searchdns(void); | ||
47 | +struct ldap_schema *defaults_get_schema(void); | ||
48 | +#endif | ||
49 | |||
50 | unsigned int defaults_read_config(unsigned int); | ||
51 | const char *defaults_get_master_map(void); | ||
52 | @@ -57,12 +65,6 @@ unsigned int defaults_get_logging(void); | ||
53 | const char *defaults_get_ldap_server(void); | ||
54 | unsigned int defaults_get_ldap_timeout(void); | ||
55 | unsigned int defaults_get_ldap_network_timeout(void); | ||
56 | -struct list_head *defaults_get_uris(void); | ||
57 | -void defaults_free_uris(struct list_head *); | ||
58 | -struct ldap_schema *defaults_get_default_schema(void); | ||
59 | -struct ldap_schema *defaults_get_schema(void); | ||
60 | -struct ldap_searchdn *defaults_get_searchdns(void); | ||
61 | -void defaults_free_searchdns(struct ldap_searchdn *); | ||
62 | unsigned int defaults_get_mount_nfs_default_proto(void); | ||
63 | unsigned int defaults_get_append_options(void); | ||
64 | unsigned int defaults_get_mount_wait(void); | ||
65 | diff --git a/include/lookup_ldap.h b/include/lookup_ldap.h | ||
66 | index e441a61..9a4ce73 100644 | ||
67 | --- a/include/lookup_ldap.h | ||
68 | +++ b/include/lookup_ldap.h | ||
69 | @@ -8,7 +8,6 @@ | ||
70 | #include <openssl/evp.h> | ||
71 | #include <openssl/err.h> | ||
72 | #include <sasl/sasl.h> | ||
73 | -#include <libxml/tree.h> | ||
74 | #include <krb5.h> | ||
75 | #endif | ||
76 | |||
77 | diff --git a/lib/defaults.c b/lib/defaults.c | ||
78 | index 5ce71b7..ae1162f 100644 | ||
79 | --- a/lib/defaults.c | ||
80 | +++ b/lib/defaults.c | ||
81 | @@ -17,9 +17,12 @@ | ||
82 | #include <ctype.h> | ||
83 | #include <string.h> | ||
84 | |||
85 | +#include "config.h" | ||
86 | #include "list.h" | ||
87 | #include "defaults.h" | ||
88 | +#ifdef WITH_LDAP | ||
89 | #include "lookup_ldap.h" | ||
90 | +#endif | ||
91 | #include "log.h" | ||
92 | #include "automount.h" | ||
93 | |||
94 | @@ -197,6 +200,7 @@ static int parse_line(char *line, char **res, char **value) | ||
95 | return 1; | ||
96 | } | ||
97 | |||
98 | +#ifdef WITH_LDAP | ||
99 | void defaults_free_uris(struct list_head *list) | ||
100 | { | ||
101 | struct list_head *next; | ||
102 | @@ -290,166 +294,6 @@ struct list_head *defaults_get_uris(void) | ||
103 | return list; | ||
104 | } | ||
105 | |||
106 | -/* | ||
107 | - * Read config env variables and check they have been set. | ||
108 | - * | ||
109 | - * This simple minded routine assumes the config file | ||
110 | - * is valid bourne shell script without spaces around "=" | ||
111 | - * and that it has valid values. | ||
112 | - */ | ||
113 | -unsigned int defaults_read_config(unsigned int to_syslog) | ||
114 | -{ | ||
115 | - FILE *f; | ||
116 | - char buf[MAX_LINE_LEN]; | ||
117 | - char *res; | ||
118 | - | ||
119 | - f = open_fopen_r(DEFAULTS_CONFIG_FILE); | ||
120 | - if (!f) | ||
121 | - return 0; | ||
122 | - | ||
123 | - while ((res = fgets(buf, MAX_LINE_LEN, f))) { | ||
124 | - char *key, *value; | ||
125 | - | ||
126 | - if (!parse_line(res, &key, &value)) | ||
127 | - continue; | ||
128 | - | ||
129 | - if (check_set_config_value(key, ENV_NAME_MASTER_MAP, value, to_syslog) || | ||
130 | - check_set_config_value(key, ENV_NAME_TIMEOUT, value, to_syslog) || | ||
131 | - check_set_config_value(key, ENV_NAME_NEGATIVE_TIMEOUT, value, to_syslog) || | ||
132 | - check_set_config_value(key, ENV_NAME_BROWSE_MODE, value, to_syslog) || | ||
133 | - check_set_config_value(key, ENV_NAME_LOGGING, value, to_syslog) || | ||
134 | - check_set_config_value(key, ENV_LDAP_TIMEOUT, value, to_syslog) || | ||
135 | - check_set_config_value(key, ENV_LDAP_NETWORK_TIMEOUT, value, to_syslog) || | ||
136 | - check_set_config_value(key, ENV_NAME_MAP_OBJ_CLASS, value, to_syslog) || | ||
137 | - check_set_config_value(key, ENV_NAME_ENTRY_OBJ_CLASS, value, to_syslog) || | ||
138 | - check_set_config_value(key, ENV_NAME_MAP_ATTR, value, to_syslog) || | ||
139 | - check_set_config_value(key, ENV_NAME_ENTRY_ATTR, value, to_syslog) || | ||
140 | - check_set_config_value(key, ENV_NAME_VALUE_ATTR, value, to_syslog) || | ||
141 | - check_set_config_value(key, ENV_APPEND_OPTIONS, value, to_syslog) || | ||
142 | - check_set_config_value(key, ENV_MOUNT_WAIT, value, to_syslog) || | ||
143 | - check_set_config_value(key, ENV_UMOUNT_WAIT, value, to_syslog) || | ||
144 | - check_set_config_value(key, ENV_AUTH_CONF_FILE, value, to_syslog) || | ||
145 | - check_set_config_value(key, ENV_MAP_HASH_TABLE_SIZE, value, to_syslog) || | ||
146 | - check_set_config_value(key, ENV_MOUNT_NFS_DEFAULT_PROTOCOL, value, to_syslog)) | ||
147 | - ; | ||
148 | - } | ||
149 | - | ||
150 | - if (!feof(f) || ferror(f)) { | ||
151 | - if (!to_syslog) { | ||
152 | - fprintf(stderr, | ||
153 | - "fgets returned error %d while reading %s\n", | ||
154 | - ferror(f), DEFAULTS_CONFIG_FILE); | ||
155 | - } else { | ||
156 | - logmsg("fgets returned error %d while reading %s", | ||
157 | - ferror(f), DEFAULTS_CONFIG_FILE); | ||
158 | - } | ||
159 | - fclose(f); | ||
160 | - return 0; | ||
161 | - } | ||
162 | - | ||
163 | - fclose(f); | ||
164 | - return 1; | ||
165 | -} | ||
166 | - | ||
167 | -const char *defaults_get_master_map(void) | ||
168 | -{ | ||
169 | - char *master; | ||
170 | - | ||
171 | - master = get_env_string(ENV_NAME_MASTER_MAP); | ||
172 | - if (!master) | ||
173 | - return strdup(default_master_map_name); | ||
174 | - | ||
175 | - return (const char *) master; | ||
176 | -} | ||
177 | - | ||
178 | -int defaults_master_set(void) | ||
179 | -{ | ||
180 | - char *val = getenv(ENV_NAME_MASTER_MAP); | ||
181 | - if (!val) | ||
182 | - return 0; | ||
183 | - | ||
184 | - return 1; | ||
185 | -} | ||
186 | - | ||
187 | -unsigned int defaults_get_timeout(void) | ||
188 | -{ | ||
189 | - long timeout; | ||
190 | - | ||
191 | - timeout = get_env_number(ENV_NAME_TIMEOUT); | ||
192 | - if (timeout < 0) | ||
193 | - timeout = DEFAULT_TIMEOUT; | ||
194 | - | ||
195 | - return (unsigned int) timeout; | ||
196 | -} | ||
197 | - | ||
198 | -unsigned int defaults_get_negative_timeout(void) | ||
199 | -{ | ||
200 | - long n_timeout; | ||
201 | - | ||
202 | - n_timeout = get_env_number(ENV_NAME_NEGATIVE_TIMEOUT); | ||
203 | - if (n_timeout <= 0) | ||
204 | - n_timeout = DEFAULT_NEGATIVE_TIMEOUT; | ||
205 | - | ||
206 | - return (unsigned int) n_timeout; | ||
207 | -} | ||
208 | - | ||
209 | -unsigned int defaults_get_browse_mode(void) | ||
210 | -{ | ||
211 | - int res; | ||
212 | - | ||
213 | - res = get_env_yesno(ENV_NAME_BROWSE_MODE); | ||
214 | - if (res < 0) | ||
215 | - res = DEFAULT_BROWSE_MODE; | ||
216 | - | ||
217 | - return res; | ||
218 | -} | ||
219 | - | ||
220 | -unsigned int defaults_get_logging(void) | ||
221 | -{ | ||
222 | - char *res; | ||
223 | - unsigned int logging = DEFAULT_LOGGING; | ||
224 | - | ||
225 | - res = get_env_string(ENV_NAME_LOGGING); | ||
226 | - if (!res) | ||
227 | - return logging; | ||
228 | - | ||
229 | - if (!strcasecmp(res, "none")) | ||
230 | - logging = DEFAULT_LOGGING; | ||
231 | - else { | ||
232 | - if (!strcasecmp(res, "verbose")) | ||
233 | - logging |= LOGOPT_VERBOSE; | ||
234 | - | ||
235 | - if (!strcasecmp(res, "debug")) | ||
236 | - logging |= LOGOPT_DEBUG; | ||
237 | - } | ||
238 | - | ||
239 | - free(res); | ||
240 | - | ||
241 | - return logging; | ||
242 | -} | ||
243 | - | ||
244 | -unsigned int defaults_get_ldap_timeout(void) | ||
245 | -{ | ||
246 | - int res; | ||
247 | - | ||
248 | - res = get_env_number(ENV_LDAP_TIMEOUT); | ||
249 | - if (res < 0) | ||
250 | - res = DEFAULT_LDAP_TIMEOUT; | ||
251 | - | ||
252 | - return res; | ||
253 | -} | ||
254 | - | ||
255 | -unsigned int defaults_get_ldap_network_timeout(void) | ||
256 | -{ | ||
257 | - int res; | ||
258 | - | ||
259 | - res = get_env_number(ENV_LDAP_NETWORK_TIMEOUT); | ||
260 | - if (res < 0) | ||
261 | - res = DEFAULT_LDAP_NETWORK_TIMEOUT; | ||
262 | - | ||
263 | - return res; | ||
264 | -} | ||
265 | - | ||
266 | struct ldap_schema *defaults_get_default_schema(void) | ||
267 | { | ||
268 | struct ldap_schema *schema; | ||
269 | @@ -645,6 +489,167 @@ struct ldap_schema *defaults_get_schema(void) | ||
270 | |||
271 | return schema; | ||
272 | } | ||
273 | +#endif | ||
274 | + | ||
275 | +/* | ||
276 | + * Read config env variables and check they have been set. | ||
277 | + * | ||
278 | + * This simple minded routine assumes the config file | ||
279 | + * is valid bourne shell script without spaces around "=" | ||
280 | + * and that it has valid values. | ||
281 | + */ | ||
282 | +unsigned int defaults_read_config(unsigned int to_syslog) | ||
283 | +{ | ||
284 | + FILE *f; | ||
285 | + char buf[MAX_LINE_LEN]; | ||
286 | + char *res; | ||
287 | + | ||
288 | + f = open_fopen_r(DEFAULTS_CONFIG_FILE); | ||
289 | + if (!f) | ||
290 | + return 0; | ||
291 | + | ||
292 | + while ((res = fgets(buf, MAX_LINE_LEN, f))) { | ||
293 | + char *key, *value; | ||
294 | + | ||
295 | + if (!parse_line(res, &key, &value)) | ||
296 | + continue; | ||
297 | + | ||
298 | + if (check_set_config_value(key, ENV_NAME_MASTER_MAP, value, to_syslog) || | ||
299 | + check_set_config_value(key, ENV_NAME_TIMEOUT, value, to_syslog) || | ||
300 | + check_set_config_value(key, ENV_NAME_NEGATIVE_TIMEOUT, value, to_syslog) || | ||
301 | + check_set_config_value(key, ENV_NAME_BROWSE_MODE, value, to_syslog) || | ||
302 | + check_set_config_value(key, ENV_NAME_LOGGING, value, to_syslog) || | ||
303 | + check_set_config_value(key, ENV_LDAP_TIMEOUT, value, to_syslog) || | ||
304 | + check_set_config_value(key, ENV_LDAP_NETWORK_TIMEOUT, value, to_syslog) || | ||
305 | + check_set_config_value(key, ENV_NAME_MAP_OBJ_CLASS, value, to_syslog) || | ||
306 | + check_set_config_value(key, ENV_NAME_ENTRY_OBJ_CLASS, value, to_syslog) || | ||
307 | + check_set_config_value(key, ENV_NAME_MAP_ATTR, value, to_syslog) || | ||
308 | + check_set_config_value(key, ENV_NAME_ENTRY_ATTR, value, to_syslog) || | ||
309 | + check_set_config_value(key, ENV_NAME_VALUE_ATTR, value, to_syslog) || | ||
310 | + check_set_config_value(key, ENV_APPEND_OPTIONS, value, to_syslog) || | ||
311 | + check_set_config_value(key, ENV_MOUNT_WAIT, value, to_syslog) || | ||
312 | + check_set_config_value(key, ENV_UMOUNT_WAIT, value, to_syslog) || | ||
313 | + check_set_config_value(key, ENV_AUTH_CONF_FILE, value, to_syslog) || | ||
314 | + check_set_config_value(key, ENV_MAP_HASH_TABLE_SIZE, value, to_syslog) || | ||
315 | + check_set_config_value(key, ENV_MOUNT_NFS_DEFAULT_PROTOCOL, value, to_syslog)) | ||
316 | + ; | ||
317 | + } | ||
318 | + | ||
319 | + if (!feof(f) || ferror(f)) { | ||
320 | + if (!to_syslog) { | ||
321 | + fprintf(stderr, | ||
322 | + "fgets returned error %d while reading %s\n", | ||
323 | + ferror(f), DEFAULTS_CONFIG_FILE); | ||
324 | + } else { | ||
325 | + logmsg("fgets returned error %d while reading %s", | ||
326 | + ferror(f), DEFAULTS_CONFIG_FILE); | ||
327 | + } | ||
328 | + fclose(f); | ||
329 | + return 0; | ||
330 | + } | ||
331 | + | ||
332 | + fclose(f); | ||
333 | + return 1; | ||
334 | +} | ||
335 | + | ||
336 | +const char *defaults_get_master_map(void) | ||
337 | +{ | ||
338 | + char *master; | ||
339 | + | ||
340 | + master = get_env_string(ENV_NAME_MASTER_MAP); | ||
341 | + if (!master) | ||
342 | + return strdup(default_master_map_name); | ||
343 | + | ||
344 | + return (const char *) master; | ||
345 | +} | ||
346 | + | ||
347 | +int defaults_master_set(void) | ||
348 | +{ | ||
349 | + char *val = getenv(ENV_NAME_MASTER_MAP); | ||
350 | + if (!val) | ||
351 | + return 0; | ||
352 | + | ||
353 | + return 1; | ||
354 | +} | ||
355 | + | ||
356 | +unsigned int defaults_get_timeout(void) | ||
357 | +{ | ||
358 | + long timeout; | ||
359 | + | ||
360 | + timeout = get_env_number(ENV_NAME_TIMEOUT); | ||
361 | + if (timeout < 0) | ||
362 | + timeout = DEFAULT_TIMEOUT; | ||
363 | + | ||
364 | + return (unsigned int) timeout; | ||
365 | +} | ||
366 | + | ||
367 | +unsigned int defaults_get_negative_timeout(void) | ||
368 | +{ | ||
369 | + long n_timeout; | ||
370 | + | ||
371 | + n_timeout = get_env_number(ENV_NAME_NEGATIVE_TIMEOUT); | ||
372 | + if (n_timeout <= 0) | ||
373 | + n_timeout = DEFAULT_NEGATIVE_TIMEOUT; | ||
374 | + | ||
375 | + return (unsigned int) n_timeout; | ||
376 | +} | ||
377 | + | ||
378 | +unsigned int defaults_get_browse_mode(void) | ||
379 | +{ | ||
380 | + int res; | ||
381 | + | ||
382 | + res = get_env_yesno(ENV_NAME_BROWSE_MODE); | ||
383 | + if (res < 0) | ||
384 | + res = DEFAULT_BROWSE_MODE; | ||
385 | + | ||
386 | + return res; | ||
387 | +} | ||
388 | + | ||
389 | +unsigned int defaults_get_logging(void) | ||
390 | +{ | ||
391 | + char *res; | ||
392 | + unsigned int logging = DEFAULT_LOGGING; | ||
393 | + | ||
394 | + res = get_env_string(ENV_NAME_LOGGING); | ||
395 | + if (!res) | ||
396 | + return logging; | ||
397 | + | ||
398 | + if (!strcasecmp(res, "none")) | ||
399 | + logging = DEFAULT_LOGGING; | ||
400 | + else { | ||
401 | + if (!strcasecmp(res, "verbose")) | ||
402 | + logging |= LOGOPT_VERBOSE; | ||
403 | + | ||
404 | + if (!strcasecmp(res, "debug")) | ||
405 | + logging |= LOGOPT_DEBUG; | ||
406 | + } | ||
407 | + | ||
408 | + free(res); | ||
409 | + | ||
410 | + return logging; | ||
411 | +} | ||
412 | + | ||
413 | +unsigned int defaults_get_ldap_timeout(void) | ||
414 | +{ | ||
415 | + int res; | ||
416 | + | ||
417 | + res = get_env_number(ENV_LDAP_TIMEOUT); | ||
418 | + if (res < 0) | ||
419 | + res = DEFAULT_LDAP_TIMEOUT; | ||
420 | + | ||
421 | + return res; | ||
422 | +} | ||
423 | + | ||
424 | +unsigned int defaults_get_ldap_network_timeout(void) | ||
425 | +{ | ||
426 | + int res; | ||
427 | + | ||
428 | + res = get_env_number(ENV_LDAP_NETWORK_TIMEOUT); | ||
429 | + if (res < 0) | ||
430 | + res = DEFAULT_LDAP_NETWORK_TIMEOUT; | ||
431 | + | ||
432 | + return res; | ||
433 | +} | ||
434 | |||
435 | unsigned int defaults_get_mount_nfs_default_proto(void) | ||
436 | { | ||
437 | diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c | ||
438 | index 3bc4dc5..431e50d 100644 | ||
439 | --- a/modules/lookup_ldap.c | ||
440 | +++ b/modules/lookup_ldap.c | ||
441 | @@ -28,6 +28,7 @@ | ||
442 | #include <arpa/nameser.h> | ||
443 | #include <resolv.h> | ||
444 | #include <lber.h> | ||
445 | +#include <libxml/tree.h> | ||
446 | |||
447 | #define MODULE_LOOKUP | ||
448 | #include "automount.h" | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-make-yellow-pages-support-optional.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-make-yellow-pages-support-optional.patch index 9504d8e7f..41996906c 100644 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-make-yellow-pages-support-optional.patch +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-make-yellow-pages-support-optional.patch | |||
@@ -1,5 +1,3 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | autofs-5.0.7 - make yellow pages support optional | 1 | autofs-5.0.7 - make yellow pages support optional |
4 | 2 | ||
5 | From: Chris Packham <chris.packham@alliedtelesis.co.nz> | 3 | From: Chris Packham <chris.packham@alliedtelesis.co.nz> |
@@ -8,6 +6,7 @@ If rpcsvc/ypclnt.h is not available don't compile in Yellow Pages | |||
8 | support. | 6 | support. |
9 | --- | 7 | --- |
10 | 8 | ||
9 | CHANGELOG | 1 + | ||
11 | Makefile.conf.in | 3 +++ | 10 | Makefile.conf.in | 3 +++ |
12 | configure | 16 ++++++++++++++++ | 11 | configure | 16 ++++++++++++++++ |
13 | configure.in | 9 +++++++++ | 12 | configure.in | 9 +++++++++ |
@@ -17,6 +16,18 @@ support. | |||
17 | 7 files changed, 39 insertions(+), 3 deletions(-) | 16 | 7 files changed, 39 insertions(+), 3 deletions(-) |
18 | 17 | ||
19 | 18 | ||
19 | diff --git a/CHANGELOG b/CHANGELOG | ||
20 | index 1130db6..ed17163 100644 | ||
21 | --- a/CHANGELOG | ||
22 | +++ b/CHANGELOG | ||
23 | @@ -25,6 +25,7 @@ | ||
24 | - don't schedule new alarms after readmap. | ||
25 | - use numeric protocol ids instead of protoent structs. | ||
26 | - lib/defaults.c: use WITH_LDAP conditional around LDAP types. | ||
27 | +- make yellow pages support optional. | ||
28 | |||
29 | 25/07/2012 autofs-5.0.7 | ||
30 | ======================= | ||
20 | diff --git a/Makefile.conf.in b/Makefile.conf.in | 31 | diff --git a/Makefile.conf.in b/Makefile.conf.in |
21 | index 802318b..3766d45 100644 | 32 | index 802318b..3766d45 100644 |
22 | --- a/Makefile.conf.in | 33 | --- a/Makefile.conf.in |
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-modules-replicated-use-sin6.addr-s6_addr32.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-modules-replicated-use-sin6.addr-s6_addr32.patch new file mode 100644 index 000000000..4516bc5f2 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-modules-replicated-use-sin6.addr-s6_addr32.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | autofs-5.0.7 - modules/replicated.c: use sin6_addr.s6_addr32 | ||
2 | |||
3 | From: Chris Packham <chris.packham@alliedtelesis.co.nz> | ||
4 | |||
5 | The exported in6.h kernel header provides a convenience macro s6_addr32 | ||
6 | for accessing the 32bit words of an ipv6 address. Use this instead of | ||
7 | __in6_u.__u6_addr32. | ||
8 | --- | ||
9 | |||
10 | CHANGELOG | 1 + | ||
11 | modules/replicated.c | 2 +- | ||
12 | 2 files changed, 2 insertions(+), 1 deletions(-) | ||
13 | |||
14 | |||
15 | diff --git a/CHANGELOG b/CHANGELOG | ||
16 | index ed17163..4eaa9f9 100644 | ||
17 | --- a/CHANGELOG | ||
18 | +++ b/CHANGELOG | ||
19 | @@ -26,6 +26,7 @@ | ||
20 | - use numeric protocol ids instead of protoent structs. | ||
21 | - lib/defaults.c: use WITH_LDAP conditional around LDAP types. | ||
22 | - make yellow pages support optional. | ||
23 | +- modules/replicated.c: use sin6_addr.s6_addr32. | ||
24 | |||
25 | 25/07/2012 autofs-5.0.7 | ||
26 | ======================= | ||
27 | diff --git a/modules/replicated.c b/modules/replicated.c | ||
28 | index dbd5513..26f64b8 100644 | ||
29 | --- a/modules/replicated.c | ||
30 | +++ b/modules/replicated.c | ||
31 | @@ -1146,7 +1146,7 @@ try_name: | ||
32 | rr4++; | ||
33 | } else if (this->ai_family == AF_INET6) { | ||
34 | struct sockaddr_in6 *addr = (struct sockaddr_in6 *) this->ai_addr; | ||
35 | - if (!IN6_IS_ADDR_LOOPBACK(addr->sin6_addr.__in6_u.__u6_addr32)) | ||
36 | + if (!IN6_IS_ADDR_LOOPBACK(addr->sin6_addr.s6_addr32)) | ||
37 | rr6++; | ||
38 | } | ||
39 | this = this->ai_next; | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-update-kernel-include-files.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-update-kernel-include-files.patch new file mode 100644 index 000000000..3b6bb926a --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-update-kernel-include-files.patch | |||
@@ -0,0 +1,92 @@ | |||
1 | autofs-5.0.7 - update kernel include files | ||
2 | |||
3 | From: Ian Kent <raven@themaw.net> | ||
4 | |||
5 | Update autofs include files to include the latest changes. | ||
6 | --- | ||
7 | include/linux/auto_fs.h | 33 ++++++++++----------------------- | ||
8 | include/linux/auto_fs4.h | 3 ++- | ||
9 | 2 files changed, 12 insertions(+), 24 deletions(-) | ||
10 | |||
11 | diff --git a/include/linux/auto_fs.h b/include/linux/auto_fs.h | ||
12 | index 91d414f..64df1a6 100644 | ||
13 | --- a/include/linux/auto_fs.h | ||
14 | +++ b/include/linux/auto_fs.h | ||
15 | @@ -14,13 +14,8 @@ | ||
16 | #ifndef _LINUX_AUTO_FS_H | ||
17 | #define _LINUX_AUTO_FS_H | ||
18 | |||
19 | -#ifdef __KERNEL__ | ||
20 | -#include <linux/fs.h> | ||
21 | -#include <linux/limits.h> | ||
22 | #include <linux/types.h> | ||
23 | -#include <linux/ioctl.h> | ||
24 | -#else | ||
25 | -#include <asm/types.h> | ||
26 | +#ifndef __KERNEL__ | ||
27 | #include <sys/ioctl.h> | ||
28 | #endif /* __KERNEL__ */ | ||
29 | |||
30 | @@ -32,25 +27,16 @@ | ||
31 | #define AUTOFS_MIN_PROTO_VERSION AUTOFS_PROTO_VERSION | ||
32 | |||
33 | /* | ||
34 | - * Architectures where both 32- and 64-bit binaries can be executed | ||
35 | - * on 64-bit kernels need this. This keeps the structure format | ||
36 | - * uniform, and makes sure the wait_queue_token isn't too big to be | ||
37 | - * passed back down to the kernel. | ||
38 | - * | ||
39 | - * This assumes that on these architectures: | ||
40 | - * mode 32 bit 64 bit | ||
41 | - * ------------------------- | ||
42 | - * int 32 bit 32 bit | ||
43 | - * long 32 bit 64 bit | ||
44 | - * | ||
45 | - * If so, 32-bit user-space code should be backwards compatible. | ||
46 | + * The wait_queue_token (autofs_wqt_t) is part of a structure which is passed | ||
47 | + * back to the kernel via ioctl from userspace. On architectures where 32- and | ||
48 | + * 64-bit userspace binaries can be executed it's important that the size of | ||
49 | + * autofs_wqt_t stays constant between 32- and 64-bit Linux kernels so that we | ||
50 | + * do not break the binary ABI interface by changing the structure size. | ||
51 | */ | ||
52 | - | ||
53 | -#if defined(__sparc__) || defined(__mips__) || defined(__x86_64__) \ | ||
54 | - || defined(__powerpc__) || defined(__s390__) | ||
55 | -typedef unsigned int autofs_wqt_t; | ||
56 | -#else | ||
57 | +#if defined(__ia64__) || defined(__alpha__) /* pure 64bit architectures */ | ||
58 | typedef unsigned long autofs_wqt_t; | ||
59 | +#else | ||
60 | +typedef unsigned int autofs_wqt_t; | ||
61 | #endif | ||
62 | |||
63 | /* Packet types */ | ||
64 | @@ -81,6 +67,7 @@ struct autofs_packet_expire { | ||
65 | #define AUTOFS_IOC_FAIL _IO(0x93,0x61) | ||
66 | #define AUTOFS_IOC_CATATONIC _IO(0x93,0x62) | ||
67 | #define AUTOFS_IOC_PROTOVER _IOR(0x93,0x63,int) | ||
68 | +#define AUTOFS_IOC_SETTIMEOUT32 _IOWR(0x93,0x64,compat_ulong_t) | ||
69 | #define AUTOFS_IOC_SETTIMEOUT _IOWR(0x93,0x64,unsigned long) | ||
70 | #define AUTOFS_IOC_EXPIRE _IOR(0x93,0x65,struct autofs_packet_expire) | ||
71 | |||
72 | diff --git a/include/linux/auto_fs4.h b/include/linux/auto_fs4.h | ||
73 | index 55fa478..e02982f 100644 | ||
74 | --- a/include/linux/auto_fs4.h | ||
75 | +++ b/include/linux/auto_fs4.h | ||
76 | @@ -12,6 +12,7 @@ | ||
77 | #define _LINUX_AUTO_FS4_H | ||
78 | |||
79 | /* Include common v3 definitions */ | ||
80 | +#include <linux/types.h> | ||
81 | #include <linux/auto_fs.h> | ||
82 | |||
83 | /* autofs v4 definitions */ | ||
84 | @@ -23,7 +24,7 @@ | ||
85 | #define AUTOFS_MIN_PROTO_VERSION 3 | ||
86 | #define AUTOFS_MAX_PROTO_VERSION 5 | ||
87 | |||
88 | -#define AUTOFS_PROTO_SUBVERSION 1 | ||
89 | +#define AUTOFS_PROTO_SUBVERSION 2 | ||
90 | |||
91 | /* Mask for expire behaviour */ | ||
92 | #define AUTOFS_EXP_IMMEDIATE 1 | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-use-numeric-protocol-ids-instead-of-protoent-structs.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-use-numeric-protocol-ids-instead-of-protoent-structs.patch new file mode 100644 index 000000000..113b0a06e --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-use-numeric-protocol-ids-instead-of-protoent-structs.patch | |||
@@ -0,0 +1,471 @@ | |||
1 | autofs-5.0.7 - use numeric protocol ids instead of protoent structs | ||
2 | |||
3 | From: Leonardo Chiquitto <leonardo.lists@gmail.com> | ||
4 | |||
5 | The function getprotobyname() is not reentrant, so we can't call | ||
6 | it simultaneously from multiple threads. Instead of switching to | ||
7 | the reentrant version which adds more complexity to the code, | ||
8 | lets use numeric protocol IDs instead of protoent structures. | ||
9 | --- | ||
10 | |||
11 | CHANGELOG | 1 + | ||
12 | include/rpc_subs.h | 4 +-- | ||
13 | lib/rpc_subs.c | 80 ++++++++++++++++++-------------------------------- | ||
14 | modules/replicated.c | 42 +++++++++++--------------- | ||
15 | 4 files changed, 50 insertions(+), 77 deletions(-) | ||
16 | |||
17 | |||
18 | diff --git a/CHANGELOG b/CHANGELOG | ||
19 | index 4cf5621..ba1d65b 100644 | ||
20 | --- a/CHANGELOG | ||
21 | +++ b/CHANGELOG | ||
22 | @@ -23,6 +23,7 @@ | ||
23 | - fix use get_proximity() without libtirpc. | ||
24 | - don't use dirent d_type to filter out files in scandir() | ||
25 | - don't schedule new alarms after readmap. | ||
26 | +- use numeric protocol ids instead of protoent structs. | ||
27 | |||
28 | 25/07/2012 autofs-5.0.7 | ||
29 | ======================= | ||
30 | diff --git a/include/rpc_subs.h b/include/rpc_subs.h | ||
31 | index ca474d9..b6d59f9 100644 | ||
32 | --- a/include/rpc_subs.h | ||
33 | +++ b/include/rpc_subs.h | ||
34 | @@ -54,7 +54,7 @@ struct conn_info { | ||
35 | unsigned short port; | ||
36 | unsigned long program; | ||
37 | unsigned long version; | ||
38 | - struct protoent *proto; | ||
39 | + int proto; | ||
40 | unsigned int send_sz; | ||
41 | unsigned int recv_sz; | ||
42 | struct timeval timeout; | ||
43 | @@ -66,7 +66,7 @@ int rpc_udp_getclient(struct conn_info *, unsigned int, unsigned int); | ||
44 | void rpc_destroy_udp_client(struct conn_info *); | ||
45 | int rpc_tcp_getclient(struct conn_info *, unsigned int, unsigned int); | ||
46 | void rpc_destroy_tcp_client(struct conn_info *); | ||
47 | -int rpc_portmap_getclient(struct conn_info *, const char *, struct sockaddr *, size_t, const char *, unsigned int); | ||
48 | +int rpc_portmap_getclient(struct conn_info *, const char *, struct sockaddr *, size_t, int, unsigned int); | ||
49 | int rpc_portmap_getport(struct conn_info *, struct pmap *, unsigned short *); | ||
50 | int rpc_ping_proto(struct conn_info *); | ||
51 | int rpc_ping(const char *, long, long, unsigned int); | ||
52 | diff --git a/lib/rpc_subs.c b/lib/rpc_subs.c | ||
53 | index d33a3c4..ad1d557 100644 | ||
54 | --- a/lib/rpc_subs.c | ||
55 | +++ b/lib/rpc_subs.c | ||
56 | @@ -170,7 +170,7 @@ static int rpc_do_create_client(struct sockaddr *addr, struct conn_info *info, i | ||
57 | |||
58 | *client = NULL; | ||
59 | |||
60 | - proto = info->proto->p_proto; | ||
61 | + proto = info->proto; | ||
62 | if (proto == IPPROTO_UDP) | ||
63 | type = SOCK_DGRAM; | ||
64 | else | ||
65 | @@ -201,7 +201,7 @@ static int rpc_do_create_client(struct sockaddr *addr, struct conn_info *info, i | ||
66 | in4_raddr = (struct sockaddr_in *) addr; | ||
67 | in4_raddr->sin_port = htons(info->port); | ||
68 | |||
69 | - switch (info->proto->p_proto) { | ||
70 | + switch (info->proto) { | ||
71 | case IPPROTO_UDP: | ||
72 | clnt = clntudp_bufcreate(in4_raddr, | ||
73 | info->program, info->version, | ||
74 | @@ -241,7 +241,7 @@ static int rpc_do_create_client(struct sockaddr *addr, struct conn_info *info, i | ||
75 | |||
76 | *client = NULL; | ||
77 | |||
78 | - proto = info->proto->p_proto; | ||
79 | + proto = info->proto; | ||
80 | if (proto == IPPROTO_UDP) | ||
81 | type = SOCK_DGRAM; | ||
82 | else | ||
83 | @@ -292,11 +292,11 @@ static int rpc_do_create_client(struct sockaddr *addr, struct conn_info *info, i | ||
84 | nb_addr.maxlen = nb_addr.len = slen; | ||
85 | nb_addr.buf = addr; | ||
86 | |||
87 | - if (info->proto->p_proto == IPPROTO_UDP) | ||
88 | + if (info->proto == IPPROTO_UDP) | ||
89 | clnt = clnt_dg_create(*fd, &nb_addr, | ||
90 | info->program, info->version, | ||
91 | info->send_sz, info->recv_sz); | ||
92 | - else if (info->proto->p_proto == IPPROTO_TCP) { | ||
93 | + else if (info->proto == IPPROTO_TCP) { | ||
94 | ret = connect_nb(*fd, addr, slen, &info->timeout); | ||
95 | if (ret < 0) | ||
96 | return ret; | ||
97 | @@ -355,7 +355,7 @@ static int create_client(struct conn_info *info, CLIENT **client) | ||
98 | memset(&hints, 0, sizeof(hints)); | ||
99 | hints.ai_flags = AI_ADDRCONFIG; | ||
100 | hints.ai_family = AF_UNSPEC; | ||
101 | - if (info->proto->p_proto == IPPROTO_UDP) | ||
102 | + if (info->proto == IPPROTO_UDP) | ||
103 | hints.ai_socktype = SOCK_DGRAM; | ||
104 | else | ||
105 | hints.ai_socktype = SOCK_STREAM; | ||
106 | @@ -370,7 +370,7 @@ static int create_client(struct conn_info *info, CLIENT **client) | ||
107 | |||
108 | haddr = ai; | ||
109 | while (haddr) { | ||
110 | - if (haddr->ai_protocol != info->proto->p_proto) { | ||
111 | + if (haddr->ai_protocol != info->proto) { | ||
112 | haddr = haddr->ai_next; | ||
113 | continue; | ||
114 | } | ||
115 | @@ -417,16 +417,11 @@ out_close: | ||
116 | int rpc_udp_getclient(struct conn_info *info, | ||
117 | unsigned int program, unsigned int version) | ||
118 | { | ||
119 | - struct protoent *pe_proto; | ||
120 | CLIENT *client; | ||
121 | int ret; | ||
122 | |||
123 | if (!info->client) { | ||
124 | - pe_proto = getprotobyname("udp"); | ||
125 | - if (!pe_proto) | ||
126 | - return -ENOENT; | ||
127 | - | ||
128 | - info->proto = pe_proto; | ||
129 | + info->proto = IPPROTO_UDP; | ||
130 | info->timeout.tv_sec = RPC_TOUT_UDP; | ||
131 | info->timeout.tv_usec = 0; | ||
132 | info->send_sz = UDPMSGSIZE; | ||
133 | @@ -458,16 +453,11 @@ void rpc_destroy_udp_client(struct conn_info *info) | ||
134 | int rpc_tcp_getclient(struct conn_info *info, | ||
135 | unsigned int program, unsigned int version) | ||
136 | { | ||
137 | - struct protoent *pe_proto; | ||
138 | CLIENT *client; | ||
139 | int ret; | ||
140 | |||
141 | if (!info->client) { | ||
142 | - pe_proto = getprotobyname("tcp"); | ||
143 | - if (!pe_proto) | ||
144 | - return -ENOENT; | ||
145 | - | ||
146 | - info->proto = pe_proto; | ||
147 | + info->proto = IPPROTO_TCP; | ||
148 | info->timeout.tv_sec = RPC_TOUT_TCP; | ||
149 | info->timeout.tv_usec = 0; | ||
150 | info->send_sz = 0; | ||
151 | @@ -513,23 +503,18 @@ void rpc_destroy_tcp_client(struct conn_info *info) | ||
152 | |||
153 | int rpc_portmap_getclient(struct conn_info *info, | ||
154 | const char *host, struct sockaddr *addr, size_t addr_len, | ||
155 | - const char *proto, unsigned int option) | ||
156 | + int proto, unsigned int option) | ||
157 | { | ||
158 | - struct protoent *pe_proto; | ||
159 | CLIENT *client; | ||
160 | int ret; | ||
161 | |||
162 | - pe_proto = getprotobyname(proto); | ||
163 | - if (!pe_proto) | ||
164 | - return -ENOENT; | ||
165 | - | ||
166 | info->host = host; | ||
167 | info->addr = addr; | ||
168 | info->addr_len = addr_len; | ||
169 | info->program = PMAPPROG; | ||
170 | info->port = PMAPPORT; | ||
171 | info->version = PMAPVERS; | ||
172 | - info->proto = pe_proto; | ||
173 | + info->proto = proto; | ||
174 | info->send_sz = RPCSMALLMSGSIZE; | ||
175 | info->recv_sz = RPCSMALLMSGSIZE; | ||
176 | info->timeout.tv_sec = PMAP_TOUT_UDP; | ||
177 | @@ -537,7 +522,7 @@ int rpc_portmap_getclient(struct conn_info *info, | ||
178 | info->close_option = option; | ||
179 | info->client = NULL; | ||
180 | |||
181 | - if (pe_proto->p_proto == IPPROTO_TCP) | ||
182 | + if (info->proto == IPPROTO_TCP) | ||
183 | info->timeout.tv_sec = PMAP_TOUT_TCP; | ||
184 | |||
185 | ret = create_client(info, &client); | ||
186 | @@ -555,7 +540,7 @@ int rpc_portmap_getport(struct conn_info *info, | ||
187 | struct conn_info pmap_info; | ||
188 | CLIENT *client; | ||
189 | enum clnt_stat status; | ||
190 | - int proto = info->proto->p_proto; | ||
191 | + int proto = info->proto; | ||
192 | int ret; | ||
193 | |||
194 | memset(&pmap_info, 0, sizeof(struct conn_info)); | ||
195 | @@ -633,13 +618,13 @@ int rpc_ping_proto(struct conn_info *info) | ||
196 | { | ||
197 | CLIENT *client; | ||
198 | enum clnt_stat status; | ||
199 | - int proto = info->proto->p_proto; | ||
200 | + int proto = info->proto; | ||
201 | int ret; | ||
202 | |||
203 | if (info->client) | ||
204 | client = info->client; | ||
205 | else { | ||
206 | - if (info->proto->p_proto == IPPROTO_UDP) { | ||
207 | + if (info->proto == IPPROTO_UDP) { | ||
208 | info->send_sz = UDPMSGSIZE; | ||
209 | info->recv_sz = UDPMSGSIZE; | ||
210 | } | ||
211 | @@ -688,7 +673,7 @@ int rpc_ping_proto(struct conn_info *info) | ||
212 | |||
213 | static unsigned int __rpc_ping(const char *host, | ||
214 | unsigned long version, | ||
215 | - char *proto, | ||
216 | + int proto, | ||
217 | long seconds, long micros, | ||
218 | unsigned int option) | ||
219 | { | ||
220 | @@ -696,6 +681,7 @@ static unsigned int __rpc_ping(const char *host, | ||
221 | struct conn_info info; | ||
222 | struct pmap parms; | ||
223 | |||
224 | + info.proto = proto; | ||
225 | info.host = host; | ||
226 | info.addr = NULL; | ||
227 | info.addr_len = 0; | ||
228 | @@ -710,13 +696,9 @@ static unsigned int __rpc_ping(const char *host, | ||
229 | |||
230 | status = RPC_PING_FAIL; | ||
231 | |||
232 | - info.proto = getprotobyname(proto); | ||
233 | - if (!info.proto) | ||
234 | - return status; | ||
235 | - | ||
236 | parms.pm_prog = NFS_PROGRAM; | ||
237 | parms.pm_vers = version; | ||
238 | - parms.pm_prot = info.proto->p_proto; | ||
239 | + parms.pm_prot = info.proto; | ||
240 | parms.pm_port = 0; | ||
241 | |||
242 | status = rpc_portmap_getport(&info, &parms, &info.port); | ||
243 | @@ -734,19 +716,19 @@ int rpc_ping(const char *host, long seconds, long micros, unsigned int option) | ||
244 | unsigned long vers2 = NFS2_VERSION; | ||
245 | unsigned int status; | ||
246 | |||
247 | - status = __rpc_ping(host, vers2, "udp", seconds, micros, option); | ||
248 | + status = __rpc_ping(host, vers2, IPPROTO_UDP, seconds, micros, option); | ||
249 | if (status > 0) | ||
250 | return RPC_PING_V2 | RPC_PING_UDP; | ||
251 | |||
252 | - status = __rpc_ping(host, vers3, "udp", seconds, micros, option); | ||
253 | + status = __rpc_ping(host, vers3, IPPROTO_UDP, seconds, micros, option); | ||
254 | if (status > 0) | ||
255 | return RPC_PING_V3 | RPC_PING_UDP; | ||
256 | |||
257 | - status = __rpc_ping(host, vers2, "tcp", seconds, micros, option); | ||
258 | + status = __rpc_ping(host, vers2, IPPROTO_TCP, seconds, micros, option); | ||
259 | if (status > 0) | ||
260 | return RPC_PING_V2 | RPC_PING_TCP; | ||
261 | |||
262 | - status = __rpc_ping(host, vers3, "tcp", seconds, micros, option); | ||
263 | + status = __rpc_ping(host, vers3, IPPROTO_TCP, seconds, micros, option); | ||
264 | if (status > 0) | ||
265 | return RPC_PING_V3 | RPC_PING_TCP; | ||
266 | |||
267 | @@ -769,7 +751,7 @@ int rpc_time(const char *host, | ||
268 | double taken; | ||
269 | struct timeval start, end; | ||
270 | struct timezone tz; | ||
271 | - char *proto = (ping_proto & RPC_PING_UDP) ? "udp" : "tcp"; | ||
272 | + int proto = (ping_proto & RPC_PING_UDP) ? IPPROTO_UDP : IPPROTO_TCP; | ||
273 | unsigned long vers = ping_vers; | ||
274 | |||
275 | gettimeofday(&start, &tz); | ||
276 | @@ -791,12 +773,12 @@ static int rpc_get_exports_proto(struct conn_info *info, exports *exp) | ||
277 | { | ||
278 | CLIENT *client; | ||
279 | enum clnt_stat status; | ||
280 | - int proto = info->proto->p_proto; | ||
281 | + int proto = info->proto; | ||
282 | unsigned int option = info->close_option; | ||
283 | int vers_entry; | ||
284 | int ret; | ||
285 | |||
286 | - if (info->proto->p_proto == IPPROTO_UDP) { | ||
287 | + if (info->proto == IPPROTO_UDP) { | ||
288 | info->send_sz = UDPMSGSIZE; | ||
289 | info->recv_sz = UDPMSGSIZE; | ||
290 | } | ||
291 | @@ -903,11 +885,9 @@ exports rpc_get_exports(const char *host, long seconds, long micros, unsigned in | ||
292 | parms.pm_port = 0; | ||
293 | |||
294 | /* Try UDP first */ | ||
295 | - info.proto = getprotobyname("udp"); | ||
296 | - if (!info.proto) | ||
297 | - goto try_tcp; | ||
298 | + info.proto = IPPROTO_UDP; | ||
299 | |||
300 | - parms.pm_prot = info.proto->p_proto; | ||
301 | + parms.pm_prot = info.proto; | ||
302 | |||
303 | status = rpc_portmap_getport(&info, &parms, &info.port); | ||
304 | if (status < 0) | ||
305 | @@ -920,11 +900,9 @@ exports rpc_get_exports(const char *host, long seconds, long micros, unsigned in | ||
306 | return exportlist; | ||
307 | |||
308 | try_tcp: | ||
309 | - info.proto = getprotobyname("tcp"); | ||
310 | - if (!info.proto) | ||
311 | - return NULL; | ||
312 | + info.proto = IPPROTO_TCP; | ||
313 | |||
314 | - parms.pm_prot = info.proto->p_proto; | ||
315 | + parms.pm_prot = info.proto; | ||
316 | |||
317 | status = rpc_portmap_getport(&info, &parms, &info.port); | ||
318 | if (status < 0) | ||
319 | diff --git a/modules/replicated.c b/modules/replicated.c | ||
320 | index 6b96320..dbd5513 100644 | ||
321 | --- a/modules/replicated.c | ||
322 | +++ b/modules/replicated.c | ||
323 | @@ -419,7 +419,7 @@ void free_host_list(struct host **list) | ||
324 | |||
325 | static unsigned int get_nfs_info(unsigned logopt, struct host *host, | ||
326 | struct conn_info *pm_info, struct conn_info *rpc_info, | ||
327 | - const char *proto, unsigned int version, int port) | ||
328 | + int proto, unsigned int version, int port) | ||
329 | { | ||
330 | unsigned int random_selection = host->options & MOUNT_FLAG_RANDOM_SELECT; | ||
331 | unsigned int use_weight_only = host->options & MOUNT_FLAG_USE_WEIGHT_ONLY; | ||
332 | @@ -433,22 +433,18 @@ static unsigned int get_nfs_info(unsigned logopt, struct host *host, | ||
333 | int status, count = 0; | ||
334 | |||
335 | if (host->addr) | ||
336 | - debug(logopt, "called with host %s(%s) proto %s version 0x%x", | ||
337 | + debug(logopt, "called with host %s(%s) proto %d version 0x%x", | ||
338 | host->name, get_addr_string(host->addr, buf, len), | ||
339 | proto, version); | ||
340 | else | ||
341 | debug(logopt, | ||
342 | - "called for host %s proto %s version 0x%x", | ||
343 | + "called for host %s proto %d version 0x%x", | ||
344 | host->name, proto, version); | ||
345 | |||
346 | - rpc_info->proto = getprotobyname(proto); | ||
347 | - if (!rpc_info->proto) | ||
348 | - return 0; | ||
349 | - | ||
350 | + rpc_info->proto = proto; | ||
351 | memset(&parms, 0, sizeof(struct pmap)); | ||
352 | - | ||
353 | parms.pm_prog = NFS_PROGRAM; | ||
354 | - parms.pm_prot = rpc_info->proto->p_proto; | ||
355 | + parms.pm_prot = proto; | ||
356 | |||
357 | if (!(version & NFS4_REQUESTED)) | ||
358 | goto v3_ver; | ||
359 | @@ -479,7 +475,7 @@ static unsigned int get_nfs_info(unsigned logopt, struct host *host, | ||
360 | } | ||
361 | } | ||
362 | |||
363 | - if (rpc_info->proto->p_proto == IPPROTO_UDP) | ||
364 | + if (rpc_info->proto == IPPROTO_UDP) | ||
365 | status = rpc_udp_getclient(rpc_info, NFS_PROGRAM, NFS4_VERSION); | ||
366 | else | ||
367 | status = rpc_tcp_getclient(rpc_info, NFS_PROGRAM, NFS4_VERSION); | ||
368 | @@ -540,7 +536,7 @@ v3_ver: | ||
369 | goto v2_ver; | ||
370 | } | ||
371 | |||
372 | - if (rpc_info->proto->p_proto == IPPROTO_UDP) | ||
373 | + if (rpc_info->proto == IPPROTO_UDP) | ||
374 | status = rpc_udp_getclient(rpc_info, NFS_PROGRAM, NFS3_VERSION); | ||
375 | else | ||
376 | status = rpc_tcp_getclient(rpc_info, NFS_PROGRAM, NFS3_VERSION); | ||
377 | @@ -587,7 +583,7 @@ v2_ver: | ||
378 | goto done_ver; | ||
379 | } | ||
380 | |||
381 | - if (rpc_info->proto->p_proto == IPPROTO_UDP) | ||
382 | + if (rpc_info->proto == IPPROTO_UDP) | ||
383 | status = rpc_udp_getclient(rpc_info, NFS_PROGRAM, NFS2_VERSION); | ||
384 | else | ||
385 | status = rpc_tcp_getclient(rpc_info, NFS_PROGRAM, NFS2_VERSION); | ||
386 | @@ -618,7 +614,7 @@ v2_ver: | ||
387 | } | ||
388 | |||
389 | done_ver: | ||
390 | - if (rpc_info->proto->p_proto == IPPROTO_UDP) { | ||
391 | + if (rpc_info->proto == IPPROTO_UDP) { | ||
392 | rpc_destroy_udp_client(rpc_info); | ||
393 | rpc_destroy_udp_client(pm_info); | ||
394 | } else { | ||
395 | @@ -675,7 +671,7 @@ static int get_vers_and_cost(unsigned logopt, struct host *host, | ||
396 | |||
397 | if (version & TCP_REQUESTED) { | ||
398 | supported = get_nfs_info(logopt, host, | ||
399 | - &pm_info, &rpc_info, "tcp", vers, port); | ||
400 | + &pm_info, &rpc_info, IPPROTO_TCP, vers, port); | ||
401 | if (IS_ERR(supported)) { | ||
402 | if (ERR(supported) == EHOSTUNREACH || | ||
403 | ERR(supported) == ETIMEDOUT) | ||
404 | @@ -688,7 +684,7 @@ static int get_vers_and_cost(unsigned logopt, struct host *host, | ||
405 | |||
406 | if (version & UDP_REQUESTED) { | ||
407 | supported = get_nfs_info(logopt, host, | ||
408 | - &pm_info, &rpc_info, "udp", vers, port); | ||
409 | + &pm_info, &rpc_info, IPPROTO_UDP, vers, port); | ||
410 | if (IS_ERR(supported)) { | ||
411 | if (!ret && ERR(supported) == ETIMEDOUT) | ||
412 | return ret; | ||
413 | @@ -709,7 +705,7 @@ static int get_supported_ver_and_cost(unsigned logopt, struct host *host, | ||
414 | socklen_t len = INET6_ADDRSTRLEN; | ||
415 | char buf[len + 1]; | ||
416 | struct conn_info pm_info, rpc_info; | ||
417 | - const char *proto; | ||
418 | + int proto; | ||
419 | unsigned int vers; | ||
420 | struct timeval start, end; | ||
421 | struct timezone tz; | ||
422 | @@ -748,10 +744,10 @@ static int get_supported_ver_and_cost(unsigned logopt, struct host *host, | ||
423 | * So, we do the conversion here. | ||
424 | */ | ||
425 | if (version & UDP_SELECTED_MASK) { | ||
426 | - proto = "udp"; | ||
427 | + proto = IPPROTO_UDP; | ||
428 | version >>= 8; | ||
429 | } else | ||
430 | - proto = "tcp"; | ||
431 | + proto = IPPROTO_TCP; | ||
432 | |||
433 | switch (version) { | ||
434 | case NFS2_SUPPORTED: | ||
435 | @@ -768,9 +764,7 @@ static int get_supported_ver_and_cost(unsigned logopt, struct host *host, | ||
436 | return 0; | ||
437 | } | ||
438 | |||
439 | - rpc_info.proto = getprotobyname(proto); | ||
440 | - if (!rpc_info.proto) | ||
441 | - return 0; | ||
442 | + rpc_info.proto = proto; | ||
443 | |||
444 | if (port > 0) | ||
445 | rpc_info.port = port; | ||
446 | @@ -786,14 +780,14 @@ static int get_supported_ver_and_cost(unsigned logopt, struct host *host, | ||
447 | |||
448 | memset(&parms, 0, sizeof(struct pmap)); | ||
449 | parms.pm_prog = NFS_PROGRAM; | ||
450 | - parms.pm_prot = rpc_info.proto->p_proto; | ||
451 | + parms.pm_prot = rpc_info.proto; | ||
452 | parms.pm_vers = vers; | ||
453 | ret = rpc_portmap_getport(&pm_info, &parms, &rpc_info.port); | ||
454 | if (ret < 0) | ||
455 | goto done; | ||
456 | } | ||
457 | |||
458 | - if (rpc_info.proto->p_proto == IPPROTO_UDP) | ||
459 | + if (rpc_info.proto == IPPROTO_UDP) | ||
460 | status = rpc_udp_getclient(&rpc_info, NFS_PROGRAM, vers); | ||
461 | else | ||
462 | status = rpc_tcp_getclient(&rpc_info, NFS_PROGRAM, vers); | ||
463 | @@ -815,7 +809,7 @@ static int get_supported_ver_and_cost(unsigned logopt, struct host *host, | ||
464 | } | ||
465 | } | ||
466 | done: | ||
467 | - if (rpc_info.proto->p_proto == IPPROTO_UDP) { | ||
468 | + if (rpc_info.proto == IPPROTO_UDP) { | ||
469 | rpc_destroy_udp_client(&rpc_info); | ||
470 | rpc_destroy_udp_client(&pm_info); | ||
471 | } else { | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-workaround-missing-GNU-versionsort-extension.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-workaround-missing-GNU-versionsort-extension.patch new file mode 100644 index 000000000..6a1a49e62 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-workaround-missing-GNU-versionsort-extension.patch | |||
@@ -0,0 +1,149 @@ | |||
1 | autofs-5.0.7 - workaround missing GNU versionsort extension | ||
2 | |||
3 | From: Chris Packham <chris.packham@alliedtelesis.co.nz> | ||
4 | |||
5 | alphasort() and scandir() are specified in POSIX.1-2008, versionsort() | ||
6 | is a GNU extension. When versionsort isn't available fallback to using | ||
7 | alphasort. | ||
8 | --- | ||
9 | |||
10 | CHANGELOG | 1 + | ||
11 | configure | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
12 | configure.in | 6 +++++ | ||
13 | include/config.h.in | 3 ++ | ||
14 | modules/lookup_dir.c | 5 ++++ | ||
15 | 5 files changed, 77 insertions(+), 0 deletions(-) | ||
16 | |||
17 | |||
18 | diff --git a/CHANGELOG b/CHANGELOG | ||
19 | index 4eaa9f9..39388a5 100644 | ||
20 | --- a/CHANGELOG | ||
21 | +++ b/CHANGELOG | ||
22 | @@ -27,6 +27,7 @@ | ||
23 | - lib/defaults.c: use WITH_LDAP conditional around LDAP types. | ||
24 | - make yellow pages support optional. | ||
25 | - modules/replicated.c: use sin6_addr.s6_addr32. | ||
26 | +- workaround missing GNU versionsort extension. | ||
27 | |||
28 | 25/07/2012 autofs-5.0.7 | ||
29 | ======================= | ||
30 | diff --git a/configure b/configure | ||
31 | index cf6428c..c1423d8 100755 | ||
32 | --- a/configure | ||
33 | +++ b/configure | ||
34 | @@ -4010,6 +4010,68 @@ $as_echo "yes" >&6; } | ||
35 | KRB5_FLAGS=`$KRB5_CONFIG --cflags` | ||
36 | fi | ||
37 | |||
38 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing versionsort" >&5 | ||
39 | +$as_echo_n "checking for library containing versionsort... " >&6; } | ||
40 | +if ${ac_cv_search_versionsort+:} false; then : | ||
41 | + $as_echo_n "(cached) " >&6 | ||
42 | +else | ||
43 | + ac_func_search_save_LIBS=$LIBS | ||
44 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
45 | +/* end confdefs.h. */ | ||
46 | + | ||
47 | +/* Override any GCC internal prototype to avoid an error. | ||
48 | + Use char because int might match the return type of a GCC | ||
49 | + builtin and then its argument prototype would still apply. */ | ||
50 | +#ifdef __cplusplus | ||
51 | +extern "C" | ||
52 | +#endif | ||
53 | +char versionsort (); | ||
54 | +int | ||
55 | +main () | ||
56 | +{ | ||
57 | +return versionsort (); | ||
58 | + ; | ||
59 | + return 0; | ||
60 | +} | ||
61 | +_ACEOF | ||
62 | +for ac_lib in '' ; do | ||
63 | + if test -z "$ac_lib"; then | ||
64 | + ac_res="none required" | ||
65 | + else | ||
66 | + ac_res=-l$ac_lib | ||
67 | + LIBS="-l$ac_lib $ac_func_search_save_LIBS" | ||
68 | + fi | ||
69 | + if ac_fn_c_try_link "$LINENO"; then : | ||
70 | + ac_cv_search_versionsort=$ac_res | ||
71 | +fi | ||
72 | +rm -f core conftest.err conftest.$ac_objext \ | ||
73 | + conftest$ac_exeext | ||
74 | + if ${ac_cv_search_versionsort+:} false; then : | ||
75 | + break | ||
76 | +fi | ||
77 | +done | ||
78 | +if ${ac_cv_search_versionsort+:} false; then : | ||
79 | + | ||
80 | +else | ||
81 | + ac_cv_search_versionsort=no | ||
82 | +fi | ||
83 | +rm conftest.$ac_ext | ||
84 | +LIBS=$ac_func_search_save_LIBS | ||
85 | +fi | ||
86 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_versionsort" >&5 | ||
87 | +$as_echo "$ac_cv_search_versionsort" >&6; } | ||
88 | +ac_res=$ac_cv_search_versionsort | ||
89 | +if test "$ac_res" != no; then : | ||
90 | + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | ||
91 | + | ||
92 | +fi | ||
93 | + | ||
94 | +if test "$ac_cv_search_versionsort" = "no"; then | ||
95 | + | ||
96 | +$as_echo "#define WITHOUT_VERSIONSORT 1" >>confdefs.h | ||
97 | + | ||
98 | +fi | ||
99 | + | ||
100 | # | ||
101 | # glibc/libc 6 new libraries | ||
102 | # | ||
103 | diff --git a/configure.in b/configure.in | ||
104 | index 363c376..4029375 100644 | ||
105 | --- a/configure.in | ||
106 | +++ b/configure.in | ||
107 | @@ -163,6 +163,12 @@ AF_SLOPPY_MOUNT() | ||
108 | AF_CHECK_LIBXML() | ||
109 | AF_CHECK_KRB5() | ||
110 | |||
111 | +AC_SEARCH_LIBS([versionsort],[]) | ||
112 | +if test "$ac_cv_search_versionsort" = "no"; then | ||
113 | + AC_DEFINE(WITHOUT_VERSIONSORT, 1, | ||
114 | + [Define if your C library does not provide versionsort]) | ||
115 | +fi | ||
116 | + | ||
117 | # | ||
118 | # glibc/libc 6 new libraries | ||
119 | # | ||
120 | diff --git a/include/config.h.in b/include/config.h.in | ||
121 | index 7f1c5b5..a2a05a8 100644 | ||
122 | --- a/include/config.h.in | ||
123 | +++ b/include/config.h.in | ||
124 | @@ -135,6 +135,9 @@ | ||
125 | /* Define to 1 to use the libtirpc tsd usage workaround */ | ||
126 | #undef TIRPC_WORKAROUND | ||
127 | |||
128 | +/* Define if your C library does not provide versionsort */ | ||
129 | +#undef WITHOUT_VERSIONSORT | ||
130 | + | ||
131 | /* Define if using the dmalloc debugging malloc package */ | ||
132 | #undef WITH_DMALLOC | ||
133 | |||
134 | diff --git a/modules/lookup_dir.c b/modules/lookup_dir.c | ||
135 | index 33901c0..07471b7 100644 | ||
136 | --- a/modules/lookup_dir.c | ||
137 | +++ b/modules/lookup_dir.c | ||
138 | @@ -39,6 +39,11 @@ | ||
139 | #define AUTOFS_DIR_EXT ".autofs" | ||
140 | #define AUTOFS_DIR_EXTSIZ (sizeof(AUTOFS_DIR_EXT) - 1) | ||
141 | |||
142 | +/* Work around non-GNU systems that don't provide versionsort */ | ||
143 | +#ifdef WITHOUT_VERSIONSORT | ||
144 | +#define versionsort alphasort | ||
145 | +#endif | ||
146 | + | ||
147 | struct lookup_context { | ||
148 | const char *mapname; | ||
149 | }; | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs_5.0.7.bb b/meta-networking/recipes-daemons/autofs/autofs_5.0.7.bb index 7d8cf1744..6751402bb 100644 --- a/meta-networking/recipes-daemons/autofs/autofs_5.0.7.bb +++ b/meta-networking/recipes-daemons/autofs/autofs_5.0.7.bb | |||
@@ -3,7 +3,7 @@ SECTION = "base" | |||
3 | LICENSE = "GPL-2.0" | 3 | LICENSE = "GPL-2.0" |
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" |
5 | 5 | ||
6 | PR = "r2" | 6 | PR = "r3" |
7 | 7 | ||
8 | DEPENDS += "libtirpc flex-native bison-native" | 8 | DEPENDS += "libtirpc flex-native bison-native" |
9 | 9 | ||
@@ -27,7 +27,30 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.bz2 \ | |||
27 | file://autofs-5.0.6-fix-recursive-mount-deadlock.patch \ | 27 | file://autofs-5.0.6-fix-recursive-mount-deadlock.patch \ |
28 | file://autofs-5.0.6-increase-file-map-read-buffer-size.patch \ | 28 | file://autofs-5.0.6-increase-file-map-read-buffer-size.patch \ |
29 | file://autofs-5.0.7-handle-new-location-of-systemd.patch \ | 29 | file://autofs-5.0.7-handle-new-location-of-systemd.patch \ |
30 | file://autofs-5.0.7-fix-map-entry-duplicate-offset-detection.patch \ | ||
31 | file://autofs-5.0.7-allow-nsswitch_conf-to-not-contain-automount-lines.patch \ | ||
32 | file://autofs-5.0.7-fix-nobind-man-page-description.patch \ | ||
33 | file://autofs-5.0.7-fix-submount-offset-delete.patch \ | ||
34 | file://autofs-5.0.7-fix-init-script-status-return.patch \ | ||
35 | file://autofs-5.0.7-fix-use-get_proximity-without-libtirpc.patch \ | ||
36 | file://autofs-5.0.7-dont-use-dirent-d_type-to-filter-out-files-in-scandir.patch \ | ||
37 | file://autofs-5.0.7-dont-schedule-new-alarms-after-readmap.patch \ | ||
38 | file://autofs-5.0.7-use-numeric-protocol-ids-instead-of-protoent-structs.patch \ | ||
39 | file://autofs-5.0.7-lib-defaults-use-WITH_LDAP-conditional-around-LDAP-types.patch \ | ||
30 | file://autofs-5.0.7-make-yellow-pages-support-optional.patch \ | 40 | file://autofs-5.0.7-make-yellow-pages-support-optional.patch \ |
41 | file://autofs-5.0.7-modules-replicated-use-sin6.addr-s6_addr32.patch \ | ||
42 | file://autofs-5.0.7-workaround-missing-GNU-versionsort-extension.patch \ | ||
43 | file://autofs-5.0.7-dont-fail-on-master-map-self-include.patch \ | ||
44 | file://autofs-5.0.7-fix-wildcard-multi-map-regression.patch \ | ||
45 | file://autofs-5.0.7-fix-file-descriptor-leak-when-reloading-the-daemon.patch \ | ||
46 | file://autofs-5.0.7-depricate-nosymlink-pseudo-option.patch \ | ||
47 | file://autofs-5.0.7-add-symlink-pseudo-option.patch \ | ||
48 | file://autofs-5.0.7-update-kernel-include-files.patch \ | ||
49 | file://autofs-5.0.7-fix-requires-in-spec-file.patch \ | ||
50 | file://autofs-5.0.7-fix-libtirpc-build-option.patch \ | ||
51 | file://autofs-5.0.7-fix-systemd-unidir-in-spec-file.patch \ | ||
52 | file://autofs-5.0.7-document-browse-option-in-man-page.patch \ | ||
53 | file://autofs-5.0.7-fix-automounter-support-on-parisc.patch \ | ||
31 | file://autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch \ | 54 | file://autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch \ |
32 | file://Makefile.rules-cross.patch \ | 55 | file://Makefile.rules-cross.patch \ |
33 | file://no-bash.patch \ | 56 | file://no-bash.patch \ |