diff options
Diffstat (limited to 'meta-networking')
57 files changed, 176 insertions, 3931 deletions
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.6-fix-recursive-mount-deadlock.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.6-fix-recursive-mount-deadlock.patch deleted file mode 100644 index e6549a7c8..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.6-fix-recursive-mount-deadlock.patch +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | autofs-5.0.6 - fix recursive mount deadlock | ||
2 | |||
3 | From: Ian Kent <raven@themaw.net> | ||
4 | |||
5 | Prior to the vfs-automount changes that went into 2.6.38 | ||
6 | and were finalized in 3.1 it was not possible to block | ||
7 | path walks into multi-mounts whose root was covered by | ||
8 | another mount. To deal with that a write lock was used | ||
9 | to ensure the mount tree construction was completed. This | ||
10 | restricts the types of recursively defined mount maps that | ||
11 | can be used and can lead to a deadlock during lookup. | ||
12 | |||
13 | Now that we can prevent processes walking into multi-mounts | ||
14 | that are under construction we no longer need to use a | ||
15 | write lock. | ||
16 | |||
17 | Also, in the patch below, a cache writelock is changed to | ||
18 | a read lock because a write lock isn't needed since the | ||
19 | map cache entry isn't being updated. | ||
20 | --- | ||
21 | |||
22 | CHANGELOG | 1 + | ||
23 | daemon/direct.c | 14 ++++++++++++-- | ||
24 | 2 files changed, 13 insertions(+), 2 deletions(-) | ||
25 | |||
26 | |||
27 | diff --git a/CHANGELOG b/CHANGELOG | ||
28 | index 936c9ab..9cdad6e 100644 | ||
29 | --- a/CHANGELOG | ||
30 | +++ b/CHANGELOG | ||
31 | @@ -12,6 +12,7 @@ | ||
32 | - configure.in: allow cross compilation. | ||
33 | - README: update mailing list subscription info. | ||
34 | - allow non root user to check status. | ||
35 | +- fix recursive mount deadlock. | ||
36 | |||
37 | 25/07/2012 autofs-5.0.7 | ||
38 | ======================= | ||
39 | diff --git a/daemon/direct.c b/daemon/direct.c | ||
40 | index 7e2f0d7..3e09c5d 100644 | ||
41 | --- a/daemon/direct.c | ||
42 | +++ b/daemon/direct.c | ||
43 | @@ -1285,6 +1285,8 @@ int handle_packet_missing_direct(struct autofs_point *ap, autofs_packet_missing_ | ||
44 | struct timespec wait; | ||
45 | struct timeval now; | ||
46 | int ioctlfd, len, state; | ||
47 | + unsigned int kver_major = get_kver_major(); | ||
48 | + unsigned int kver_minor = get_kver_minor(); | ||
49 | |||
50 | pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &state); | ||
51 | |||
52 | @@ -1297,8 +1299,16 @@ int handle_packet_missing_direct(struct autofs_point *ap, autofs_packet_missing_ | ||
53 | * cache entry we will not be able to find the mapent. So | ||
54 | * we must take the source writelock to ensure the parent | ||
55 | * has mount is complete before we look for the entry. | ||
56 | + * | ||
57 | + * Since the vfs-automount kernel changes we can now block | ||
58 | + * on covered mounts during mount tree construction so a | ||
59 | + * write lock is no longer needed. So we now can handle a | ||
60 | + * wider class of recursively define mount lookups. | ||
61 | */ | ||
62 | - master_source_writelock(ap->entry); | ||
63 | + if (kver_major > 5 || (kver_major == 5 && kver_minor > 1)) | ||
64 | + master_source_readlock(ap->entry); | ||
65 | + else | ||
66 | + master_source_writelock(ap->entry); | ||
67 | map = ap->entry->maps; | ||
68 | while (map) { | ||
69 | /* | ||
70 | @@ -1311,7 +1321,7 @@ int handle_packet_missing_direct(struct autofs_point *ap, autofs_packet_missing_ | ||
71 | } | ||
72 | |||
73 | mc = map->mc; | ||
74 | - cache_writelock(mc); | ||
75 | + cache_readlock(mc); | ||
76 | me = cache_lookup_ino(mc, pkt->dev, pkt->ino); | ||
77 | if (me) | ||
78 | break; | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.6-increase-file-map-read-buffer-size.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.6-increase-file-map-read-buffer-size.patch deleted file mode 100644 index 39b22212a..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.6-increase-file-map-read-buffer-size.patch +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | autofs-5.0.6 - increase file map read buffer size | ||
2 | |||
3 | From: Ian Kent <raven@themaw.net> | ||
4 | |||
5 | The file map entry read buffer can be too small for larger | ||
6 | multi-mount map entries so increase it. | ||
7 | --- | ||
8 | |||
9 | CHANGELOG | 1 + | ||
10 | include/automount.h | 2 +- | ||
11 | 2 files changed, 2 insertions(+), 1 deletions(-) | ||
12 | |||
13 | |||
14 | diff --git a/CHANGELOG b/CHANGELOG | ||
15 | index 9cdad6e..3bdf8a4 100644 | ||
16 | --- a/CHANGELOG | ||
17 | +++ b/CHANGELOG | ||
18 | @@ -13,6 +13,7 @@ | ||
19 | - README: update mailing list subscription info. | ||
20 | - allow non root user to check status. | ||
21 | - fix recursive mount deadlock. | ||
22 | +- increase file map read buffer size. | ||
23 | |||
24 | 25/07/2012 autofs-5.0.7 | ||
25 | ======================= | ||
26 | diff --git a/include/automount.h b/include/automount.h | ||
27 | index 561fcc2..37541f5 100644 | ||
28 | --- a/include/automount.h | ||
29 | +++ b/include/automount.h | ||
30 | @@ -233,7 +233,7 @@ int rmdir_path(struct autofs_point *ap, const char *path, dev_t dev); | ||
31 | #define AUTOFS_LOOKUP_VERSION 5 | ||
32 | |||
33 | #define KEY_MAX_LEN NAME_MAX | ||
34 | -#define MAPENT_MAX_LEN 4095 | ||
35 | +#define MAPENT_MAX_LEN 16384 | ||
36 | #define PARSE_MAX_BUF KEY_MAX_LEN + MAPENT_MAX_LEN + 2 | ||
37 | |||
38 | int lookup_nss_read_master(struct master *master, time_t age); | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-README-update-mailing-list-subscription-info.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-README-update-mailing-list-subscription-info.patch deleted file mode 100644 index 99b61818c..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-README-update-mailing-list-subscription-info.patch +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | autofs-5.0.7 - README: update mailing list subscription info | ||
2 | |||
3 | From: Chris Packham <chris.packham@alliedtelesis.co.nz> | ||
4 | |||
5 | Following the kernel.org compromise the mailing list was moved to | ||
6 | vger.kernel.org. Update the subscription info and add URLs for the gmane | ||
7 | mailing list archive. | ||
8 | |||
9 | Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> | ||
10 | --- | ||
11 | |||
12 | CHANGELOG | 1 + | ||
13 | README | 17 ++++++++++++++--- | ||
14 | 2 files changed, 15 insertions(+), 3 deletions(-) | ||
15 | |||
16 | |||
17 | diff --git a/CHANGELOG b/CHANGELOG | ||
18 | index fe801e8..44c9fb2 100644 | ||
19 | --- a/CHANGELOG | ||
20 | +++ b/CHANGELOG | ||
21 | @@ -10,6 +10,7 @@ | ||
22 | - fix null map entry order handling. | ||
23 | - make description of default MOUNT_WAIT setting clear. | ||
24 | - configure.in: allow cross compilation. | ||
25 | +- README: update mailing list subscription info. | ||
26 | |||
27 | 25/07/2012 autofs-5.0.7 | ||
28 | ======================= | ||
29 | diff --git a/README b/README | ||
30 | index cef16a9..9024e64 100644 | ||
31 | --- a/README | ||
32 | +++ b/README | ||
33 | @@ -43,9 +43,20 @@ Fitzhardinge's <jeremy@goop.org> work on autofs 3. Further enhancements | ||
34 | have been made by Ian Kent <raven@themaw.net>. | ||
35 | |||
36 | If you use or want to help develop autofs, please join the autofs | ||
37 | -mailing list by visiting: | ||
38 | +mailing list by sending an email to: | ||
39 | |||
40 | - http://linux.kernel.org/mailman/listinfo/autofs | ||
41 | + majordomo@vger.kernel.org | ||
42 | |||
43 | -and folling the instructions there to subscribe to the autofs mailing list. | ||
44 | +With the body text: | ||
45 | + | ||
46 | + subscribe autofs | ||
47 | + | ||
48 | +Once subscribed you can send patches to: | ||
49 | + | ||
50 | + autofs@vger.kernel.org | ||
51 | + | ||
52 | +The autofs mailing list archive can be viewed on gmane: | ||
53 | + | ||
54 | + http://news.gmane.org/gmane.linux.kernel.autofs | ||
55 | + http://blog.gmane.org/gmane.linux.kernel.autofs | ||
56 | |||
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 deleted file mode 100644 index b0440f4a5..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-add-symlink-pseudo-option.patch +++ /dev/null | |||
@@ -1,217 +0,0 @@ | |||
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-add-timeout-option-description-to-man-page.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-add-timeout-option-description-to-man-page.patch deleted file mode 100644 index ac598dd72..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-add-timeout-option-description-to-man-page.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | autofs-5.0.7 - add timeout option description to man page | ||
2 | |||
3 | From: Ian Kent <ikent@redhat.com> | ||
4 | |||
5 | The pseudo option used t set the timeout for map entries is one of | ||
6 | the most most frequently used autofs options but is not mentioned | ||
7 | in auto.master(5). | ||
8 | --- | ||
9 | |||
10 | CHANGELOG | 1 + | ||
11 | man/auto.master.5.in | 5 +++++ | ||
12 | 2 files changed, 6 insertions(+), 0 deletions(-) | ||
13 | |||
14 | |||
15 | diff --git a/CHANGELOG b/CHANGELOG | ||
16 | index 93b9c26..7b8d185 100644 | ||
17 | --- a/CHANGELOG | ||
18 | +++ b/CHANGELOG | ||
19 | @@ -6,6 +6,7 @@ | ||
20 | - fix parse buffer initialization. | ||
21 | - fix typo in automount(8). | ||
22 | - dont wait forever to restart. | ||
23 | +- add timeout option description to man page. | ||
24 | |||
25 | 25/07/2012 autofs-5.0.7 | ||
26 | ======================= | ||
27 | diff --git a/man/auto.master.5.in b/man/auto.master.5.in | ||
28 | index 54269f8..21d7544 100644 | ||
29 | --- a/man/auto.master.5.in | ||
30 | +++ b/man/auto.master.5.in | ||
31 | @@ -167,6 +167,11 @@ server is specified in the map entry. If no server weights are given | ||
32 | then each available server will be tried in the order listed, within | ||
33 | proximity. | ||
34 | .TP | ||
35 | +.I "\-t, \-\-timeout <seconds>" | ||
36 | +Set the expire timeout for map entries. This option can be used to | ||
37 | +override the global default given either on the command line | ||
38 | +or in the configuration. | ||
39 | +.TP | ||
40 | .I "\-n, \-\-negative\-timeout <seconds>" | ||
41 | Set the timeout for caching failed key lookups. This option can be | ||
42 | used to override the global default given either on the command line | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-allow-non-root-user-to-check-status.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-allow-non-root-user-to-check-status.patch deleted file mode 100644 index 6020c31e2..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-allow-non-root-user-to-check-status.patch +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
1 | autofs-5.0.7 - allow non root user to check status | ||
2 | |||
3 | From: Ian Kent <ikent@redhat.com> | ||
4 | |||
5 | |||
6 | --- | ||
7 | |||
8 | CHANGELOG | 1 + | ||
9 | redhat/autofs.init.in | 20 +++++++++++++------- | ||
10 | 2 files changed, 14 insertions(+), 7 deletions(-) | ||
11 | |||
12 | |||
13 | diff --git a/CHANGELOG b/CHANGELOG | ||
14 | index 44c9fb2..936c9ab 100644 | ||
15 | --- a/CHANGELOG | ||
16 | +++ b/CHANGELOG | ||
17 | @@ -11,6 +11,7 @@ | ||
18 | - make description of default MOUNT_WAIT setting clear. | ||
19 | - configure.in: allow cross compilation. | ||
20 | - README: update mailing list subscription info. | ||
21 | +- allow non root user to check status. | ||
22 | |||
23 | 25/07/2012 autofs-5.0.7 | ||
24 | ======================= | ||
25 | diff --git a/redhat/autofs.init.in b/redhat/autofs.init.in | ||
26 | index cd5cb34..fe18b3e 100644 | ||
27 | --- a/redhat/autofs.init.in | ||
28 | +++ b/redhat/autofs.init.in | ||
29 | @@ -167,6 +167,19 @@ function usage_message() { | ||
30 | |||
31 | RETVAL=0 | ||
32 | |||
33 | +# allow non-root users to read status / usage | ||
34 | + | ||
35 | +case "$1" in | ||
36 | + status) | ||
37 | + status -p @@autofspiddir@@/autofs.pid -l autofs $prog | ||
38 | + exit 0; | ||
39 | + ;; | ||
40 | + usage) | ||
41 | + usage_message | ||
42 | + exit 0; | ||
43 | + ;; | ||
44 | +esac | ||
45 | + | ||
46 | # Only the root user may change the service status | ||
47 | if [ `id -u` -ne 0 ] && [ "$1" != "status" ]; then | ||
48 | echo "insufficient privilege to change service status" | ||
49 | @@ -184,9 +197,6 @@ case "$1" in | ||
50 | stop) | ||
51 | stop | ||
52 | ;; | ||
53 | - status) | ||
54 | - status -p @@autofspiddir@@/autofs.pid -l autofs $prog | ||
55 | - ;; | ||
56 | restart|force-reload) | ||
57 | restart | ||
58 | ;; | ||
59 | @@ -202,10 +212,6 @@ case "$1" in | ||
60 | restart | ||
61 | fi | ||
62 | ;; | ||
63 | - usage) | ||
64 | - usage_message | ||
65 | - exit 0 | ||
66 | - ;; | ||
67 | *) | ||
68 | usage_message | ||
69 | exit 2 | ||
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 deleted file mode 100644 index c342d1072..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-allow-nsswitch_conf-to-not-contain-automount-lines.patch +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
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-configure-allow-cross-compilation-update.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-configure-allow-cross-compilation-update.patch deleted file mode 100644 index a8bc3ce85..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-configure-allow-cross-compilation-update.patch +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | autofs-5.0.7 - configure: allow cross compilation update | ||
2 | |||
3 | From: Chris Packham <chris.packham@alliedtelesis.co.nz> | ||
4 | |||
5 | Run "make distclean" to update configure. This should have been included | ||
6 | in 5936c738 when configure.in was updated but it was missed. | ||
7 | --- | ||
8 | |||
9 | configure | 5 +---- | ||
10 | 1 files changed, 1 insertions(+), 4 deletions(-) | ||
11 | |||
12 | |||
13 | diff --git a/configure b/configure | ||
14 | index bf62203..ba3bba6 100755 | ||
15 | --- a/configure | ||
16 | +++ b/configure | ||
17 | @@ -5378,10 +5378,7 @@ DAEMON_LDFLAGS= | ||
18 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc -fPIE works" >&5 | ||
19 | $as_echo_n "checking whether gcc -fPIE works... " >&6; } | ||
20 | if test "$cross_compiling" = yes; then : | ||
21 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | ||
22 | -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | ||
23 | -as_fn_error $? "cannot run test program while cross compiling | ||
24 | -See \`config.log' for more details" "$LINENO" 5; } | ||
25 | + gcc_supports_pie=no | ||
26 | else | ||
27 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
28 | /* end confdefs.h. */ | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-configure-in-allow-cross-compilation.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-configure-in-allow-cross-compilation.patch deleted file mode 100644 index ac18bd94b..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-configure-in-allow-cross-compilation.patch +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | autofs-5.0.7 - configure.in: allow cross compilation | ||
2 | |||
3 | From: Chris Packham <chris.packham@alliedtelesis.co.nz> | ||
4 | |||
5 | The default behaviour of AC_RUN_IFELSE is to stop with an error if cross | ||
6 | compiling. Avoid this by providing the optional 4th argument to set | ||
7 | gcc_supports_pie=no if support for PIE cannot be detected. | ||
8 | |||
9 | Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> | ||
10 | --- | ||
11 | |||
12 | CHANGELOG | 1 + | ||
13 | configure.in | 2 +- | ||
14 | 2 files changed, 2 insertions(+), 1 deletions(-) | ||
15 | |||
16 | |||
17 | diff --git a/CHANGELOG b/CHANGELOG | ||
18 | index 961e340..fe801e8 100644 | ||
19 | --- a/CHANGELOG | ||
20 | +++ b/CHANGELOG | ||
21 | @@ -9,6 +9,7 @@ | ||
22 | - add timeout option description to man page. | ||
23 | - fix null map entry order handling. | ||
24 | - make description of default MOUNT_WAIT setting clear. | ||
25 | +- configure.in: allow cross compilation. | ||
26 | |||
27 | 25/07/2012 autofs-5.0.7 | ||
28 | ======================= | ||
29 | diff --git a/configure.in b/configure.in | ||
30 | index 1a24e34..90bda62 100644 | ||
31 | --- a/configure.in | ||
32 | +++ b/configure.in | ||
33 | @@ -307,7 +307,7 @@ DAEMON_CFLAGS= | ||
34 | DAEMON_LDFLAGS= | ||
35 | AC_MSG_CHECKING([whether gcc -fPIE works]) | ||
36 | AC_RUN_IFELSE([AC_LANG_PROGRAM([[]], [[int main(void) {return 0;}]])], | ||
37 | - [gcc_supports_pie=yes], [gcc_supports_pie=no]) | ||
38 | + [gcc_supports_pie=yes], [gcc_supports_pie=no], [gcc_supports_pie=no]) | ||
39 | AC_MSG_RESULT([$gcc_supports_pie]) | ||
40 | if test $gcc_supports_pie = yes ; then | ||
41 | DAEMON_CFLAGS="-fPIE" | ||
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 deleted file mode 100644 index c784de7c9..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-depricate-nosymlink-pseudo-option.patch +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
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 deleted file mode 100644 index 4641342d2..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-document-browse-option-in-man-page.patch +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
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 deleted file mode 100644 index afb908b9e..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-fail-on-master-map-self-include.patch +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
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 deleted file mode 100644 index 64446874c..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-schedule-new-alarms-after-readmap.patch +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
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 deleted file mode 100644 index 9c9d99b95..000000000 --- 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 +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
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-dont-wait-forever-to-restart.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-wait-forever-to-restart.patch deleted file mode 100644 index 9973b47fa..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-wait-forever-to-restart.patch +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | autofs-5.0.7 - dont wait forever to restart | ||
2 | |||
3 | From: Ian Kent <ikent@redhat.com> | ||
4 | |||
5 | When restarting autofs the daemon must be stopped before it is started | ||
6 | again if it is to function properly. At the moment the init script waits | ||
7 | forever which is not ok if the daemon won't exit for some reason. | ||
8 | |||
9 | So, if the daemon is still running after the stop, run stop() again, wait | ||
10 | a bit longer and if it still hasn't stopped kill it with a SIGKILL to clear | ||
11 | the way for the startup. | ||
12 | --- | ||
13 | |||
14 | CHANGELOG | 1 + | ||
15 | redhat/autofs.init.in | 13 ++++++++++--- | ||
16 | 2 files changed, 11 insertions(+), 3 deletions(-) | ||
17 | |||
18 | |||
19 | diff --git a/CHANGELOG b/CHANGELOG | ||
20 | index 6051723..93b9c26 100644 | ||
21 | --- a/CHANGELOG | ||
22 | +++ b/CHANGELOG | ||
23 | @@ -5,6 +5,7 @@ | ||
24 | - fix ipv6 proximity calculation. | ||
25 | - fix parse buffer initialization. | ||
26 | - fix typo in automount(8). | ||
27 | +- dont wait forever to restart. | ||
28 | |||
29 | 25/07/2012 autofs-5.0.7 | ||
30 | ======================= | ||
31 | diff --git a/redhat/autofs.init.in b/redhat/autofs.init.in | ||
32 | index ec6d5d6..cd5cb34 100644 | ||
33 | --- a/redhat/autofs.init.in | ||
34 | +++ b/redhat/autofs.init.in | ||
35 | @@ -129,9 +129,16 @@ function restart() { | ||
36 | status autofs > /dev/null 2>&1 | ||
37 | if [ $? -eq 0 ]; then | ||
38 | stop | ||
39 | - while [ -n "`pidof $prog`" ] ; do | ||
40 | - sleep 5 | ||
41 | - done | ||
42 | + if [ -n "`pidof $prog`" ]; then | ||
43 | + # If we failed to stop, try at least one more time | ||
44 | + # after waiting a little while | ||
45 | + sleep 20 | ||
46 | + stop | ||
47 | + auto_pid=`pidof $prog` | ||
48 | + if [ -n "$auto_pid" ]; then | ||
49 | + kill -9 $auto_pid | ||
50 | + fi | ||
51 | + fi | ||
52 | fi | ||
53 | start | ||
54 | } | ||
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 deleted file mode 100644 index e00fdc190..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-automounter-support-on-parisc.patch +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
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 deleted file mode 100644 index 8ce6c0f9e..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-file-descriptor-leak-when-reloading-the-daemon.patch +++ /dev/null | |||
@@ -1,179 +0,0 @@ | |||
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 deleted file mode 100644 index a08d62fc3..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-init-script-status-return.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
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-ipv6-proximity-calculation.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-ipv6-proximity-calculation.patch deleted file mode 100644 index b341ecdd5..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-ipv6-proximity-calculation.patch +++ /dev/null | |||
@@ -1,297 +0,0 @@ | |||
1 | autofs-5.0.7 - fix ipv6 proximity calculation | ||
2 | |||
3 | From: Ian Kent <ikent@redhat.com> | ||
4 | |||
5 | The socket based ioctl used to get interface information only | ||
6 | return IPv4 information. Change get_proximity() function to use | ||
7 | getifaddrs(3) instead. | ||
8 | --- | ||
9 | |||
10 | CHANGELOG | 1 | ||
11 | modules/replicated.c | 149 ++++++++++++++------------------------------------ | ||
12 | 2 files changed, 42 insertions(+), 108 deletions(-) | ||
13 | |||
14 | |||
15 | diff --git a/CHANGELOG b/CHANGELOG | ||
16 | index dc38580..34c70fa 100644 | ||
17 | --- a/CHANGELOG | ||
18 | +++ b/CHANGELOG | ||
19 | @@ -2,6 +2,7 @@ | ||
20 | ======================= | ||
21 | - fix nobind sun escaped map entries. | ||
22 | - fix use cache entry after free in lookup_prune_one_cache(). | ||
23 | +- fix ipv6 proximity calculation. | ||
24 | |||
25 | 25/07/2012 autofs-5.0.7 | ||
26 | ======================= | ||
27 | diff --git a/modules/replicated.c b/modules/replicated.c | ||
28 | index 78046c6..bd6003b 100644 | ||
29 | --- a/modules/replicated.c | ||
30 | +++ b/modules/replicated.c | ||
31 | @@ -52,6 +52,7 @@ | ||
32 | #include <net/if.h> | ||
33 | #include <netinet/in.h> | ||
34 | #include <netdb.h> | ||
35 | +#include <ifaddrs.h> | ||
36 | |||
37 | #include "rpc_subs.h" | ||
38 | #include "replicated.h" | ||
39 | @@ -110,58 +111,18 @@ void seed_random(void) | ||
40 | return; | ||
41 | } | ||
42 | |||
43 | -static int alloc_ifreq(struct ifconf *ifc, int sock) | ||
44 | -{ | ||
45 | - int ret, lastlen = ifc_last_len, len = ifc_buf_len; | ||
46 | - char err_buf[MAX_ERR_BUF], *buf; | ||
47 | - | ||
48 | - while (1) { | ||
49 | - buf = malloc(len); | ||
50 | - if (!buf) { | ||
51 | - char *estr = strerror_r(errno, err_buf, MAX_ERR_BUF); | ||
52 | - logerr("malloc: %s", estr); | ||
53 | - return 0; | ||
54 | - } | ||
55 | - | ||
56 | - ifc->ifc_len = len; | ||
57 | - ifc->ifc_req = (struct ifreq *) buf; | ||
58 | - | ||
59 | - ret = ioctl(sock, SIOCGIFCONF, ifc); | ||
60 | - if (ret == -1) { | ||
61 | - char *estr = strerror_r(errno, err_buf, MAX_ERR_BUF); | ||
62 | - logerr("ioctl: %s", estr); | ||
63 | - free(buf); | ||
64 | - return 0; | ||
65 | - } | ||
66 | - | ||
67 | - if (ifc->ifc_len <= lastlen) | ||
68 | - break; | ||
69 | - | ||
70 | - lastlen = ifc->ifc_len; | ||
71 | - len += MAX_IFC_BUF; | ||
72 | - free(buf); | ||
73 | - } | ||
74 | - | ||
75 | - if (lastlen != ifc_last_len) { | ||
76 | - ifc_last_len = lastlen; | ||
77 | - ifc_buf_len = len; | ||
78 | - } | ||
79 | - | ||
80 | - return 1; | ||
81 | -} | ||
82 | - | ||
83 | static unsigned int get_proximity(struct sockaddr *host_addr) | ||
84 | { | ||
85 | + struct ifaddrs *ifa = NULL; | ||
86 | + struct ifaddrs *this; | ||
87 | struct sockaddr_in *addr, *msk_addr, *if_addr; | ||
88 | struct sockaddr_in6 *addr6, *msk6_addr, *if6_addr; | ||
89 | struct in_addr *hst_addr; | ||
90 | struct in6_addr *hst6_addr; | ||
91 | int addr_len; | ||
92 | - char buf[MAX_ERR_BUF], *ptr; | ||
93 | - struct ifconf ifc; | ||
94 | - struct ifreq *ifr, nmptr; | ||
95 | - int sock, ret, i; | ||
96 | + char buf[MAX_ERR_BUF]; | ||
97 | uint32_t mask, ha, ia, *mask6, *ha6, *ia6; | ||
98 | + int ret; | ||
99 | |||
100 | addr = NULL; | ||
101 | addr6 = NULL; | ||
102 | @@ -170,13 +131,14 @@ static unsigned int get_proximity(struct sockaddr *host_addr) | ||
103 | mask6 = NULL; | ||
104 | ha6 = NULL; | ||
105 | ia6 = NULL; | ||
106 | + ha = 0; | ||
107 | |||
108 | switch (host_addr->sa_family) { | ||
109 | case AF_INET: | ||
110 | addr = (struct sockaddr_in *) host_addr; | ||
111 | hst_addr = (struct in_addr *) &addr->sin_addr; | ||
112 | ha = ntohl((uint32_t) hst_addr->s_addr); | ||
113 | - addr_len = sizeof(hst_addr); | ||
114 | + addr_len = sizeof(*hst_addr); | ||
115 | break; | ||
116 | |||
117 | case AF_INET6: | ||
118 | @@ -186,7 +148,7 @@ static unsigned int get_proximity(struct sockaddr *host_addr) | ||
119 | addr6 = (struct sockaddr_in6 *) host_addr; | ||
120 | hst6_addr = (struct in6_addr *) &addr6->sin6_addr; | ||
121 | ha6 = &hst6_addr->s6_addr32[0]; | ||
122 | - addr_len = sizeof(hst6_addr); | ||
123 | + addr_len = sizeof(*hst6_addr); | ||
124 | break; | ||
125 | #endif | ||
126 | |||
127 | @@ -194,36 +156,29 @@ static unsigned int get_proximity(struct sockaddr *host_addr) | ||
128 | return PROXIMITY_ERROR; | ||
129 | } | ||
130 | |||
131 | - sock = open_sock(AF_INET, SOCK_DGRAM, 0); | ||
132 | - if (sock < 0) { | ||
133 | + ret = getifaddrs(&ifa); | ||
134 | + if (ret) { | ||
135 | char *estr = strerror_r(errno, buf, MAX_ERR_BUF); | ||
136 | - logerr("socket creation failed: %s", estr); | ||
137 | + logerr("getifaddrs: %s", estr); | ||
138 | return PROXIMITY_ERROR; | ||
139 | } | ||
140 | |||
141 | - if (!alloc_ifreq(&ifc, sock)) { | ||
142 | - close(sock); | ||
143 | - return PROXIMITY_ERROR; | ||
144 | - } | ||
145 | - | ||
146 | - /* For each interface */ | ||
147 | - | ||
148 | - /* Is the address a local interface */ | ||
149 | - i = 0; | ||
150 | - ptr = (char *) &ifc.ifc_buf[0]; | ||
151 | - | ||
152 | - while (ptr < (char *) ifc.ifc_req + ifc.ifc_len) { | ||
153 | - ifr = (struct ifreq *) ptr; | ||
154 | + this = ifa; | ||
155 | + while (this) { | ||
156 | + if (this->ifa_flags & IFF_POINTOPOINT || | ||
157 | + this->ifa_addr->sa_data == NULL) { | ||
158 | + this = this->ifa_next; | ||
159 | + continue; | ||
160 | + } | ||
161 | |||
162 | - switch (ifr->ifr_addr.sa_family) { | ||
163 | + switch (this->ifa_addr->sa_family) { | ||
164 | case AF_INET: | ||
165 | if (host_addr->sa_family == AF_INET6) | ||
166 | break; | ||
167 | - if_addr = (struct sockaddr_in *) &ifr->ifr_addr; | ||
168 | + if_addr = (struct sockaddr_in *) this->ifa_addr; | ||
169 | ret = memcmp(&if_addr->sin_addr, hst_addr, addr_len); | ||
170 | if (!ret) { | ||
171 | - close(sock); | ||
172 | - free(ifc.ifc_req); | ||
173 | + freeifaddrs(ifa); | ||
174 | return PROXIMITY_LOCAL; | ||
175 | } | ||
176 | break; | ||
177 | @@ -234,55 +189,41 @@ static unsigned int get_proximity(struct sockaddr *host_addr) | ||
178 | #else | ||
179 | if (host_addr->sa_family == AF_INET) | ||
180 | break; | ||
181 | - | ||
182 | - if6_addr = (struct sockaddr_in6 *) &ifr->ifr_addr; | ||
183 | + if6_addr = (struct sockaddr_in6 *) this->ifa_addr; | ||
184 | ret = memcmp(&if6_addr->sin6_addr, hst6_addr, addr_len); | ||
185 | if (!ret) { | ||
186 | - close(sock); | ||
187 | - free(ifc.ifc_req); | ||
188 | + freeifaddrs(ifa); | ||
189 | return PROXIMITY_LOCAL; | ||
190 | } | ||
191 | #endif | ||
192 | - | ||
193 | default: | ||
194 | break; | ||
195 | } | ||
196 | - | ||
197 | - i++; | ||
198 | - ptr = (char *) &ifc.ifc_req[i]; | ||
199 | + this = this->ifa_next; | ||
200 | } | ||
201 | |||
202 | - i = 0; | ||
203 | - ptr = (char *) &ifc.ifc_buf[0]; | ||
204 | - | ||
205 | - while (ptr < (char *) ifc.ifc_req + ifc.ifc_len) { | ||
206 | - ifr = (struct ifreq *) ptr; | ||
207 | - | ||
208 | - nmptr = *ifr; | ||
209 | - ret = ioctl(sock, SIOCGIFNETMASK, &nmptr); | ||
210 | - if (ret == -1) { | ||
211 | - char *estr = strerror_r(errno, buf, MAX_ERR_BUF); | ||
212 | - logerr("ioctl: %s", estr); | ||
213 | - close(sock); | ||
214 | - free(ifc.ifc_req); | ||
215 | - return PROXIMITY_ERROR; | ||
216 | + this = ifa; | ||
217 | + while (this) { | ||
218 | + if (this->ifa_flags & IFF_POINTOPOINT || | ||
219 | + this->ifa_addr->sa_data == NULL) { | ||
220 | + this = this->ifa_next; | ||
221 | + continue; | ||
222 | } | ||
223 | |||
224 | - switch (ifr->ifr_addr.sa_family) { | ||
225 | + switch (this->ifa_addr->sa_family) { | ||
226 | case AF_INET: | ||
227 | if (host_addr->sa_family == AF_INET6) | ||
228 | break; | ||
229 | - if_addr = (struct sockaddr_in *) &ifr->ifr_addr; | ||
230 | + if_addr = (struct sockaddr_in *) this->ifa_addr; | ||
231 | ia = ntohl((uint32_t) if_addr->sin_addr.s_addr); | ||
232 | |||
233 | - /* Is the address within a localiy attached subnet */ | ||
234 | + /* Is the address within a localy attached subnet */ | ||
235 | |||
236 | - msk_addr = (struct sockaddr_in *) &nmptr.ifr_netmask; | ||
237 | + msk_addr = (struct sockaddr_in *) this->ifa_netmask; | ||
238 | mask = ntohl((uint32_t) msk_addr->sin_addr.s_addr); | ||
239 | |||
240 | if ((ia & mask) == (ha & mask)) { | ||
241 | - close(sock); | ||
242 | - free(ifc.ifc_req); | ||
243 | + freeifaddrs(ifa); | ||
244 | return PROXIMITY_SUBNET; | ||
245 | } | ||
246 | |||
247 | @@ -304,8 +245,7 @@ static unsigned int get_proximity(struct sockaddr *host_addr) | ||
248 | break; | ||
249 | |||
250 | if ((ia & mask) == (ha & mask)) { | ||
251 | - close(sock); | ||
252 | - free(ifc.ifc_req); | ||
253 | + freeifaddrs(ifa); | ||
254 | return PROXIMITY_NET; | ||
255 | } | ||
256 | break; | ||
257 | @@ -316,35 +256,28 @@ static unsigned int get_proximity(struct sockaddr *host_addr) | ||
258 | #else | ||
259 | if (host_addr->sa_family == AF_INET) | ||
260 | break; | ||
261 | - | ||
262 | - if6_addr = (struct sockaddr_in6 *) &ifr->ifr_addr; | ||
263 | + if6_addr = (struct sockaddr_in6 *) this->ifa_addr; | ||
264 | ia6 = &if6_addr->sin6_addr.s6_addr32[0]; | ||
265 | |||
266 | /* Is the address within the network of the interface */ | ||
267 | |||
268 | - msk6_addr = (struct sockaddr_in6 *) &nmptr.ifr_netmask; | ||
269 | + msk6_addr = (struct sockaddr_in6 *) this->ifa_netmask; | ||
270 | mask6 = &msk6_addr->sin6_addr.s6_addr32[0]; | ||
271 | |||
272 | if (ipv6_mask_cmp(ha6, ia6, mask6)) { | ||
273 | - close(sock); | ||
274 | - free(ifc.ifc_req); | ||
275 | + freeifaddrs(ifa); | ||
276 | return PROXIMITY_SUBNET; | ||
277 | } | ||
278 | |||
279 | /* How do we define "local network" in ipv6? */ | ||
280 | #endif | ||
281 | - break; | ||
282 | - | ||
283 | default: | ||
284 | break; | ||
285 | } | ||
286 | - | ||
287 | - i++; | ||
288 | - ptr = (char *) &ifc.ifc_req[i]; | ||
289 | + this = this->ifa_next; | ||
290 | } | ||
291 | |||
292 | - close(sock); | ||
293 | - free(ifc.ifc_req); | ||
294 | + freeifaddrs(ifa); | ||
295 | |||
296 | return PROXIMITY_OTHER; | ||
297 | } | ||
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 deleted file mode 100644 index 8ad2afacf..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-libtirpc-build-option.patch +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
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 deleted file mode 100644 index 126d9a25b..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-map-entry-duplicate-offset-detection.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
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 deleted file mode 100644 index 41328a0e4..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-nobind-man-page-description.patch +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
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-nobind-sun-escaped-map-entries.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-nobind-sun-escaped-map-entries.patch deleted file mode 100644 index b5d7ad26c..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-nobind-sun-escaped-map-entries.patch +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | autofs-5.0.7 - fix nobind sun escaped map entries | ||
2 | |||
3 | From: Ian Kent <ikent@redhat.com> | ||
4 | |||
5 | If a map contains a Sun colon escape to indicate the mount is a local | ||
6 | file system and the "nobind" option is present there is no hostname in | ||
7 | the mount location and the mount fails. | ||
8 | --- | ||
9 | |||
10 | CHANGELOG | 4 ++++ | ||
11 | modules/mount_nfs.c | 5 +++-- | ||
12 | 2 files changed, 7 insertions(+), 2 deletions(-) | ||
13 | |||
14 | |||
15 | diff --git a/CHANGELOG b/CHANGELOG | ||
16 | index 67fdcec..faf4c80 100644 | ||
17 | --- a/CHANGELOG | ||
18 | +++ b/CHANGELOG | ||
19 | @@ -1,3 +1,7 @@ | ||
20 | +??/??/2012 autofs-5.0.8 | ||
21 | +======================= | ||
22 | +- fix nobind sun escaped map entries. | ||
23 | + | ||
24 | 25/07/2012 autofs-5.0.7 | ||
25 | ======================= | ||
26 | - fix ipv6 name for lookup fix. | ||
27 | diff --git a/modules/mount_nfs.c b/modules/mount_nfs.c | ||
28 | index 9b8e5f1..bbbb1de 100644 | ||
29 | --- a/modules/mount_nfs.c | ||
30 | +++ b/modules/mount_nfs.c | ||
31 | @@ -263,13 +263,14 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int | ||
32 | } else | ||
33 | strcpy(loc, n_addr); | ||
34 | } else { | ||
35 | - loc = malloc(strlen(this->name) + strlen(this->path) + 2); | ||
36 | + char *host = this->name ? this->name : "localhost"; | ||
37 | + loc = malloc(strlen(host) + strlen(this->path) + 2); | ||
38 | if (!loc) { | ||
39 | char *estr = strerror_r(errno, buf, MAX_ERR_BUF); | ||
40 | error(ap->logopt, "malloc: %s", estr); | ||
41 | goto forced_fail; | ||
42 | } | ||
43 | - strcpy(loc, this->name); | ||
44 | + strcpy(loc, host); | ||
45 | } | ||
46 | strcat(loc, ":"); | ||
47 | strcat(loc, this->path); | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-null-map-entry-order-handling.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-null-map-entry-order-handling.patch deleted file mode 100644 index 610afaaa7..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-null-map-entry-order-handling.patch +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | autofs-5.0.7 - fix null map entry order handling | ||
2 | |||
3 | From: Ian Kent <ikent@redhat.com> | ||
4 | |||
5 | If a null map entry appears after a corresponding indirect map entry | ||
6 | autofs doesn't handle it properly. | ||
7 | |||
8 | Since it appears after the map entry it should'nt affect it but autofs | ||
9 | doesn't account for this case and assumes the map entry is already | ||
10 | mounted and tries to shut it down causing attempted access to facilities | ||
11 | that don't exist. | ||
12 | --- | ||
13 | |||
14 | CHANGELOG | 1 + | ||
15 | lib/master.c | 32 +++++++++++++++++++++++++++++--- | ||
16 | 2 files changed, 30 insertions(+), 3 deletions(-) | ||
17 | |||
18 | |||
19 | diff --git a/CHANGELOG b/CHANGELOG | ||
20 | index 7b8d185..79cf673 100644 | ||
21 | --- a/CHANGELOG | ||
22 | +++ b/CHANGELOG | ||
23 | @@ -7,6 +7,7 @@ | ||
24 | - fix typo in automount(8). | ||
25 | - dont wait forever to restart. | ||
26 | - add timeout option description to man page. | ||
27 | +- fix null map entry order handling. | ||
28 | |||
29 | 25/07/2012 autofs-5.0.7 | ||
30 | ======================= | ||
31 | diff --git a/lib/master.c b/lib/master.c | ||
32 | index 904b13d..a0e62f2 100644 | ||
33 | --- a/lib/master.c | ||
34 | +++ b/lib/master.c | ||
35 | @@ -1179,9 +1179,35 @@ int master_mount_mounts(struct master *master, time_t age, int readall) | ||
36 | |||
37 | cache_readlock(nc); | ||
38 | ne = cache_lookup_distinct(nc, this->path); | ||
39 | - if (ne && this->age > ne->age) { | ||
40 | + /* | ||
41 | + * If this path matched a nulled entry the master map entry | ||
42 | + * must be an indirect mount so the master map entry line | ||
43 | + * number may be obtained from this->maps. | ||
44 | + */ | ||
45 | + if (ne) { | ||
46 | + int lineno = ne->age; | ||
47 | cache_unlock(nc); | ||
48 | - st_add_task(ap, ST_SHUTDOWN_PENDING); | ||
49 | + | ||
50 | + /* null entry appears after map entry */ | ||
51 | + if (this->maps->master_line < lineno) { | ||
52 | + warn(ap->logopt, | ||
53 | + "ignoring null entry that appears after " | ||
54 | + "existing entry for %s", this->path); | ||
55 | + goto cont; | ||
56 | + } | ||
57 | + if (ap->state != ST_INIT) { | ||
58 | + st_add_task(ap, ST_SHUTDOWN_PENDING); | ||
59 | + continue; | ||
60 | + } | ||
61 | + /* | ||
62 | + * The map entry hasn't been started yet and we've | ||
63 | + * seen a preceeding null map entry for it so just | ||
64 | + * delete it from the master map entry list so it | ||
65 | + * doesn't get in the road. | ||
66 | + */ | ||
67 | + list_del_init(&this->list); | ||
68 | + master_free_mapent_sources(ap->entry, 1); | ||
69 | + master_free_mapent(ap->entry); | ||
70 | continue; | ||
71 | } | ||
72 | nested = cache_partial_match(nc, this->path); | ||
73 | @@ -1194,7 +1220,7 @@ int master_mount_mounts(struct master *master, time_t age, int readall) | ||
74 | cache_delete(nc, nested->key); | ||
75 | } | ||
76 | cache_unlock(nc); | ||
77 | - | ||
78 | +cont: | ||
79 | st_mutex_lock(); | ||
80 | |||
81 | state_pipe = this->ap->state_pipe[1]; | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-parse-buffer-initialization.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-parse-buffer-initialization.patch deleted file mode 100644 index 22bd5da25..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-parse-buffer-initialization.patch +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | autofs-5.0.7 - fix parse buffer initialization | ||
2 | |||
3 | From: Ian Kent <ikent@redhat.com> | ||
4 | |||
5 | When parsing a master map entry, if the mount point path is longer than | ||
6 | the following map string the lexical analyzer buffer may not have a null | ||
7 | terminator where it is expected. If the map name string also contains a | ||
8 | string that is the same as a map type at the end the map name the map | ||
9 | name is not constructed correctly because of this lack of a string | ||
10 | terminator in the buffer. | ||
11 | --- | ||
12 | |||
13 | CHANGELOG | 1 + | ||
14 | lib/master_tok.l | 4 +++- | ||
15 | 2 files changed, 4 insertions(+), 1 deletions(-) | ||
16 | |||
17 | |||
18 | diff --git a/CHANGELOG b/CHANGELOG | ||
19 | index 34c70fa..276d6ba 100644 | ||
20 | --- a/CHANGELOG | ||
21 | +++ b/CHANGELOG | ||
22 | @@ -3,6 +3,7 @@ | ||
23 | - fix nobind sun escaped map entries. | ||
24 | - fix use cache entry after free in lookup_prune_one_cache(). | ||
25 | - fix ipv6 proximity calculation. | ||
26 | +- fix parse buffer initialization. | ||
27 | |||
28 | 25/07/2012 autofs-5.0.7 | ||
29 | ======================= | ||
30 | diff --git a/lib/master_tok.l b/lib/master_tok.l | ||
31 | index 0d6edb7..30abb15 100644 | ||
32 | --- a/lib/master_tok.l | ||
33 | +++ b/lib/master_tok.l | ||
34 | @@ -74,7 +74,8 @@ int my_yyinput(char *, int); | ||
35 | #define unput(c) (*(char *) --line = c) | ||
36 | #endif | ||
37 | |||
38 | -char buff[1024]; | ||
39 | +#define BUFF_LEN 1024 | ||
40 | +char buff[BUFF_LEN]; | ||
41 | char *bptr; | ||
42 | char *optr = buff; | ||
43 | unsigned int tlen; | ||
44 | @@ -174,6 +175,7 @@ OPTNTOUT (-n{OPTWS}|-n{OPTWS}={OPTWS}|--negative-timeout{OPTWS}|--negative-timeo | ||
45 | *bptr = '\0'; | ||
46 | strcpy(master_lval.strtype, buff); | ||
47 | bptr = buff; | ||
48 | + memset(buff, 0, BUFF_LEN); | ||
49 | return(PATH); | ||
50 | } | ||
51 | |||
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 deleted file mode 100644 index 404c84854..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-requires-in-spec-file.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
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 deleted file mode 100644 index b38e21433..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-submount-offset-delete.patch +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
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 deleted file mode 100644 index d856faf42..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-systemd-unidir-in-spec-file.patch +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
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-typo-in-automount-8.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-typo-in-automount-8.patch deleted file mode 100644 index 6d88ce0cb..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-typo-in-automount-8.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | autofs-5.0.7 - fix typo in automount(8) | ||
2 | |||
3 | From: Ian Kent <ikent@redhat.com> | ||
4 | |||
5 | |||
6 | --- | ||
7 | |||
8 | CHANGELOG | 1 + | ||
9 | man/automount.8 | 2 +- | ||
10 | 2 files changed, 2 insertions(+), 1 deletions(-) | ||
11 | |||
12 | |||
13 | diff --git a/CHANGELOG b/CHANGELOG | ||
14 | index 276d6ba..6051723 100644 | ||
15 | --- a/CHANGELOG | ||
16 | +++ b/CHANGELOG | ||
17 | @@ -4,6 +4,7 @@ | ||
18 | - fix use cache entry after free in lookup_prune_one_cache(). | ||
19 | - fix ipv6 proximity calculation. | ||
20 | - fix parse buffer initialization. | ||
21 | +- fix typo in automount(8). | ||
22 | |||
23 | 25/07/2012 autofs-5.0.7 | ||
24 | ======================= | ||
25 | diff --git a/man/automount.8 b/man/automount.8 | ||
26 | index 0186984..dddebce 100644 | ||
27 | --- a/man/automount.8 | ||
28 | +++ b/man/automount.8 | ||
29 | @@ -51,7 +51,7 @@ are over-ridden macro definitions of the same name specified in | ||
30 | mount entries. | ||
31 | .TP | ||
32 | .I "\-f, \-\-foreground" | ||
33 | -Run the daemon in the forground and log to stderr instead of syslog." | ||
34 | +Run the daemon in the foreground and log to stderr instead of syslog." | ||
35 | .TP | ||
36 | .I "\-r, \-\-random-multimount-selection" | ||
37 | 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-use-cache-entry-after-free-mistake.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-use-cache-entry-after-free-mistake.patch deleted file mode 100644 index a469c1686..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-use-cache-entry-after-free-mistake.patch +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | autofs-5.0.7 - fix use cache entry after free mistake | ||
2 | |||
3 | From: Ian Kent <ikent@redhat.com> | ||
4 | |||
5 | Fix an obvious use after free mistake in lookup_prune_one_cache(). | ||
6 | --- | ||
7 | |||
8 | CHANGELOG | 1 + | ||
9 | daemon/lookup.c | 7 +++++-- | ||
10 | 2 files changed, 6 insertions(+), 2 deletions(-) | ||
11 | |||
12 | |||
13 | diff --git a/CHANGELOG b/CHANGELOG | ||
14 | index faf4c80..dc38580 100644 | ||
15 | --- a/CHANGELOG | ||
16 | +++ b/CHANGELOG | ||
17 | @@ -1,6 +1,7 @@ | ||
18 | ??/??/2012 autofs-5.0.8 | ||
19 | ======================= | ||
20 | - fix nobind sun escaped map entries. | ||
21 | +- fix use cache entry after free in lookup_prune_one_cache(). | ||
22 | |||
23 | 25/07/2012 autofs-5.0.7 | ||
24 | ======================= | ||
25 | diff --git a/daemon/lookup.c b/daemon/lookup.c | ||
26 | index 7909536..e3d9536 100644 | ||
27 | --- a/daemon/lookup.c | ||
28 | +++ b/daemon/lookup.c | ||
29 | @@ -1103,15 +1103,18 @@ void lookup_prune_one_cache(struct autofs_point *ap, struct mapent_cache *mc, ti | ||
30 | if (valid) | ||
31 | cache_delete(mc, key); | ||
32 | else if (!is_mounted(_PROC_MOUNTS, path, MNTS_AUTOFS)) { | ||
33 | + dev_t devid = ap->dev; | ||
34 | status = CHE_FAIL; | ||
35 | + if (ap->type == LKP_DIRECT) | ||
36 | + devid = this->dev; | ||
37 | if (this->ioctlfd == -1) | ||
38 | status = cache_delete(mc, key); | ||
39 | if (status != CHE_FAIL) { | ||
40 | if (ap->type == LKP_INDIRECT) { | ||
41 | if (ap->flags & MOUNT_FLAG_GHOST) | ||
42 | - rmdir_path(ap, path, ap->dev); | ||
43 | + rmdir_path(ap, path, devid); | ||
44 | } else | ||
45 | - rmdir_path(ap, path, this->dev); | ||
46 | + rmdir_path(ap, path, devid); | ||
47 | } | ||
48 | } | ||
49 | cache_unlock(mc); | ||
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 deleted file mode 100644 index 74ed8fa64..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-use-get_proximity-without-libtirpc.patch +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
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 deleted file mode 100644 index 44e4a18e3..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-wildcard-multi-map-regression.patch +++ /dev/null | |||
@@ -1,225 +0,0 @@ | |||
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-handle-new-location-of-systemd.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-handle-new-location-of-systemd.patch deleted file mode 100644 index 1c26794f5..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-handle-new-location-of-systemd.patch +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | autofs-5.0.7 - Handle new location of systemd | ||
2 | |||
3 | From: Frederic Crozat <fcrozat@suse.com> | ||
4 | |||
5 | Some distributions are moving systemd unit files from /lib to | ||
6 | /usr/lib, so we need to test both directories. | ||
7 | |||
8 | edit: imk | ||
9 | It occurs to me I've forgotten to check for the 64 bit variants | ||
10 | of the directories, so add them as well. | ||
11 | end edit: imk | ||
12 | --- | ||
13 | |||
14 | CHANGELOG | 1 + | ||
15 | aclocal.m4 | 2 +- | ||
16 | configure | 2 +- | ||
17 | 3 files changed, 3 insertions(+), 2 deletions(-) | ||
18 | |||
19 | |||
20 | diff --git a/CHANGELOG b/CHANGELOG | ||
21 | index 3bdf8a4..8f6bb3a 100644 | ||
22 | --- a/CHANGELOG | ||
23 | +++ b/CHANGELOG | ||
24 | @@ -14,6 +14,7 @@ | ||
25 | - allow non root user to check status. | ||
26 | - fix recursive mount deadlock. | ||
27 | - increase file map read buffer size. | ||
28 | +- handle new location of systemd. | ||
29 | |||
30 | 25/07/2012 autofs-5.0.7 | ||
31 | ======================= | ||
32 | diff --git a/aclocal.m4 b/aclocal.m4 | ||
33 | index 1798c8b..47bca0c 100644 | ||
34 | --- a/aclocal.m4 | ||
35 | +++ b/aclocal.m4 | ||
36 | @@ -234,7 +234,7 @@ AC_DEFUN([AF_WITH_SYSTEMD], | ||
37 | [if test "$withval" = yes; then | ||
38 | if test -z "$systemddir"; then | ||
39 | AC_MSG_CHECKING([location of the systemd unit files directory]) | ||
40 | - for systemd_d in /lib/systemd/system; do | ||
41 | + for systemd_d in /usr/lib/systemd/system /usr/lib64/systemd/system /lib/systemd/system /lib64/systemd/system; do | ||
42 | if test -z "$systemddir"; then | ||
43 | if test -d "$systemd_d"; then | ||
44 | systemddir="$systemd_d" | ||
45 | diff --git a/configure b/configure | ||
46 | index ba3bba6..3722a46 100755 | ||
47 | --- a/configure | ||
48 | +++ b/configure | ||
49 | @@ -2157,7 +2157,7 @@ if test "${with_systemd+set}" = set; then : | ||
50 | if test -z "$systemddir"; then | ||
51 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking location of the systemd unit files directory" >&5 | ||
52 | $as_echo_n "checking location of the systemd unit files directory... " >&6; } | ||
53 | - for systemd_d in /lib/systemd/system; do | ||
54 | + for systemd_d in /usr/lib/systemd/system /usr/lib64/systemd/system /lib/systemd/system /lib64/systemd/system; do | ||
55 | if test -z "$systemddir"; then | ||
56 | if test -d "$systemd_d"; then | ||
57 | systemddir="$systemd_d" | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-include-usage-in-usage-message.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-include-usage-in-usage-message.patch deleted file mode 100644 index 1c8a565a2..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-include-usage-in-usage-message.patch +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | autofs-5.0.7 - include usage in usage message | ||
2 | |||
3 | From: Ian Kent <ikent@redhat.com> | ||
4 | |||
5 | Since usage is a case entry we should also nclude it in the usage | ||
6 | message. | ||
7 | --- | ||
8 | |||
9 | redhat/autofs.init.in | 2 +- | ||
10 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
11 | |||
12 | |||
13 | diff --git a/redhat/autofs.init.in b/redhat/autofs.init.in | ||
14 | index 8e355da..ec6d5d6 100644 | ||
15 | --- a/redhat/autofs.init.in | ||
16 | +++ b/redhat/autofs.init.in | ||
17 | @@ -155,7 +155,7 @@ function reload() { | ||
18 | } | ||
19 | |||
20 | function usage_message() { | ||
21 | - echo $"Usage: $0 {start|forcestart|stop|status|restart|force-reload|forcerestart|reload|condrestart|try-restart}" | ||
22 | + echo $"Usage: $0 {start|forcestart|stop|status|restart|force-reload|forcerestart|reload|condrestart|try-restart|usage}" | ||
23 | } | ||
24 | |||
25 | RETVAL=0 | ||
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 deleted file mode 100644 index 22e0418e5..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-lib-defaults-use-WITH_LDAP-conditional-around-LDAP-types.patch +++ /dev/null | |||
@@ -1,448 +0,0 @@ | |||
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-description-of-default-MOUNT_WAIT-setting-clear.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-make-description-of-default-MOUNT_WAIT-setting-clear.patch deleted file mode 100644 index a3dd3fb69..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-make-description-of-default-MOUNT_WAIT-setting-clear.patch +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | autofs-5.0.7 - make description of default MOUNT_WAIT setting clear | ||
2 | |||
3 | From: Ian Kent <ikent@redhat.com> | ||
4 | |||
5 | |||
6 | --- | ||
7 | |||
8 | CHANGELOG | 1 + | ||
9 | redhat/autofs.sysconfig.in | 5 +++-- | ||
10 | samples/autofs.conf.default.in | 5 +++-- | ||
11 | 3 files changed, 7 insertions(+), 4 deletions(-) | ||
12 | |||
13 | |||
14 | diff --git a/CHANGELOG b/CHANGELOG | ||
15 | index 79cf673..961e340 100644 | ||
16 | --- a/CHANGELOG | ||
17 | +++ b/CHANGELOG | ||
18 | @@ -8,6 +8,7 @@ | ||
19 | - dont wait forever to restart. | ||
20 | - add timeout option description to man page. | ||
21 | - fix null map entry order handling. | ||
22 | +- make description of default MOUNT_WAIT setting clear. | ||
23 | |||
24 | 25/07/2012 autofs-5.0.7 | ||
25 | ======================= | ||
26 | diff --git a/redhat/autofs.sysconfig.in b/redhat/autofs.sysconfig.in | ||
27 | index 36b924d..a8992c4 100644 | ||
28 | --- a/redhat/autofs.sysconfig.in | ||
29 | +++ b/redhat/autofs.sysconfig.in | ||
30 | @@ -18,8 +18,9 @@ TIMEOUT=300 | ||
31 | # Setting this timeout can cause problems when | ||
32 | # mount would otherwise wait for a server that | ||
33 | # is temporarily unavailable, such as when it's | ||
34 | -# restarting. The defailt of waiting for mount(8) | ||
35 | -# usually results in a wait of around 3 minutes. | ||
36 | +# restarting. The default setting (-1) of waiting | ||
37 | +# for mount(8) usually results in a wait of around | ||
38 | +# 3 minutes. | ||
39 | # | ||
40 | #MOUNT_WAIT=-1 | ||
41 | # | ||
42 | diff --git a/samples/autofs.conf.default.in b/samples/autofs.conf.default.in | ||
43 | index ac2f63b..1da89cf 100644 | ||
44 | --- a/samples/autofs.conf.default.in | ||
45 | +++ b/samples/autofs.conf.default.in | ||
46 | @@ -18,8 +18,9 @@ TIMEOUT=300 | ||
47 | # Setting this timeout can cause problems when | ||
48 | # mount would otherwise wait for a server that | ||
49 | # is temporarily unavailable, such as when it's | ||
50 | -# restarting. The defailt of waiting for mount(8) | ||
51 | -# usually results in a wait of around 3 minutes. | ||
52 | +# restarting. The default setting (-1) of waiting | ||
53 | +# for mount(8) usually results in a wait of around | ||
54 | +# 3 minutes. | ||
55 | # | ||
56 | #MOUNT_WAIT=-1 | ||
57 | # | ||
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 deleted file mode 100644 index 41996906c..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-make-yellow-pages-support-optional.patch +++ /dev/null | |||
@@ -1,156 +0,0 @@ | |||
1 | autofs-5.0.7 - make yellow pages support optional | ||
2 | |||
3 | From: Chris Packham <chris.packham@alliedtelesis.co.nz> | ||
4 | |||
5 | If rpcsvc/ypclnt.h is not available don't compile in Yellow Pages | ||
6 | support. | ||
7 | --- | ||
8 | |||
9 | CHANGELOG | 1 + | ||
10 | Makefile.conf.in | 3 +++ | ||
11 | configure | 16 ++++++++++++++++ | ||
12 | configure.in | 9 +++++++++ | ||
13 | include/config.h.in | 3 +++ | ||
14 | lib/rpc_subs.c | 1 - | ||
15 | modules/Makefile | 9 +++++++-- | ||
16 | 7 files changed, 39 insertions(+), 3 deletions(-) | ||
17 | |||
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 | ======================= | ||
31 | diff --git a/Makefile.conf.in b/Makefile.conf.in | ||
32 | index 802318b..3766d45 100644 | ||
33 | --- a/Makefile.conf.in | ||
34 | +++ b/Makefile.conf.in | ||
35 | @@ -43,6 +43,9 @@ NISPLUS = @HAVE_NISPLUS@ | ||
36 | # SMBFS support: yes (1) no (0) | ||
37 | SMBFS = @HAVE_SMBMOUNT@ | ||
38 | |||
39 | +# YellowPages support: yes (1) no (0) | ||
40 | +YPCLNT = @HAVE_YPCLNT@ | ||
41 | + | ||
42 | # Support for calling e2fsck when mounting ext2 filesystems | ||
43 | EXT2FS = @HAVE_E2FSCK@ | ||
44 | |||
45 | diff --git a/configure b/configure | ||
46 | index 3722a46..cf6428c 100755 | ||
47 | --- a/configure | ||
48 | +++ b/configure | ||
49 | @@ -614,6 +614,7 @@ XML_FLAGS | ||
50 | LIBLDAP | ||
51 | HAVE_LDAP | ||
52 | LDAP_FLAGS | ||
53 | +HAVE_YPCLNT | ||
54 | HAVE_NISPLUS | ||
55 | EGREP | ||
56 | GREP | ||
57 | @@ -4575,6 +4576,21 @@ fi | ||
58 | |||
59 | |||
60 | |||
61 | +# YellowPages support? | ||
62 | +HAVE_YPCLNT=0 | ||
63 | +ac_fn_c_check_header_mongrel "$LINENO" "rpcsvc/ypclnt.h" "ac_cv_header_rpcsvc_ypclnt_h" "$ac_includes_default" | ||
64 | +if test "x$ac_cv_header_rpcsvc_ypclnt_h" = xyes; then : | ||
65 | + HAVE_YPCLNT=1 | ||
66 | +fi | ||
67 | + | ||
68 | + | ||
69 | + | ||
70 | +if test "$HAVE_YPCLNT" = "1"; then | ||
71 | + | ||
72 | +$as_echo "#define HAVE_YPCLNT 1" >>confdefs.h | ||
73 | + | ||
74 | +fi | ||
75 | + | ||
76 | # | ||
77 | # OpenLDAP support? Expect that this may have a special directory... | ||
78 | # | ||
79 | diff --git a/configure.in b/configure.in | ||
80 | index 90bda62..363c376 100644 | ||
81 | --- a/configure.in | ||
82 | +++ b/configure.in | ||
83 | @@ -213,6 +213,15 @@ HAVE_NISPLUS=0 | ||
84 | AC_CHECK_HEADER(rpcsvc/nis.h, HAVE_NISPLUS=1) | ||
85 | AC_SUBST(HAVE_NISPLUS) | ||
86 | |||
87 | +# YellowPages support? | ||
88 | +HAVE_YPCLNT=0 | ||
89 | +AC_CHECK_HEADER([rpcsvc/ypclnt.h], HAVE_YPCLNT=1) | ||
90 | +AC_SUBST(HAVE_YPCLNT) | ||
91 | +if test "$HAVE_YPCLNT" = "1"; then | ||
92 | + AC_DEFINE(HAVE_YPCLNT, 1, | ||
93 | + [Define if using YellowPages]) | ||
94 | +fi | ||
95 | + | ||
96 | # | ||
97 | # OpenLDAP support? Expect that this may have a special directory... | ||
98 | # | ||
99 | diff --git a/include/config.h.in b/include/config.h.in | ||
100 | index 9bdf98a..7f1c5b5 100644 | ||
101 | --- a/include/config.h.in | ||
102 | +++ b/include/config.h.in | ||
103 | @@ -72,6 +72,9 @@ | ||
104 | /* Define to 1 if you have the <unistd.h> header file. */ | ||
105 | #undef HAVE_UNISTD_H | ||
106 | |||
107 | +/* Define if using YellowPages */ | ||
108 | +#undef HAVE_YPCLNT | ||
109 | + | ||
110 | /* Use libxml2 tsd usage workaround */ | ||
111 | #undef LIBXML2_WORKAROUND | ||
112 | |||
113 | diff --git a/lib/rpc_subs.c b/lib/rpc_subs.c | ||
114 | index ad1d557..718caf9 100644 | ||
115 | --- a/lib/rpc_subs.c | ||
116 | +++ b/lib/rpc_subs.c | ||
117 | @@ -27,7 +27,6 @@ | ||
118 | #include <net/if.h> | ||
119 | #include <netinet/in.h> | ||
120 | #include <arpa/inet.h> | ||
121 | -#include <rpcsvc/ypclnt.h> | ||
122 | #include <errno.h> | ||
123 | #include <sys/ioctl.h> | ||
124 | #include <ctype.h> | ||
125 | diff --git a/modules/Makefile b/modules/Makefile | ||
126 | index 939da7c..c5deb24 100644 | ||
127 | --- a/modules/Makefile | ||
128 | +++ b/modules/Makefile | ||
129 | @@ -5,13 +5,13 @@ | ||
130 | -include ../Makefile.conf | ||
131 | include ../Makefile.rules | ||
132 | |||
133 | -SRCS := lookup_yp.c lookup_file.c lookup_program.c lookup_userhome.c \ | ||
134 | +SRCS := lookup_file.c lookup_program.c lookup_userhome.c \ | ||
135 | lookup_multi.c lookup_hosts.c lookup_dir.c \ | ||
136 | parse_sun.c \ | ||
137 | mount_generic.c mount_nfs.c mount_afs.c mount_autofs.c \ | ||
138 | mount_changer.c mount_bind.c | ||
139 | |||
140 | -MODS := lookup_yp.so lookup_file.so lookup_program.so lookup_userhome.so \ | ||
141 | +MODS := lookup_file.so lookup_program.so lookup_userhome.so \ | ||
142 | lookup_multi.so lookup_hosts.so lookup_dir.so \ | ||
143 | parse_sun.so \ | ||
144 | mount_generic.so mount_nfs.so mount_afs.so mount_autofs.so \ | ||
145 | @@ -37,6 +37,11 @@ ifeq ($(NISPLUS), 1) | ||
146 | MODS += lookup_nisplus.so | ||
147 | endif | ||
148 | |||
149 | +ifeq ($(YPCLNT), 1) | ||
150 | + SRCS += lookup_yp.c | ||
151 | + MODS += lookup_yp.so | ||
152 | +endif | ||
153 | + | ||
154 | ifeq ($(LDAP), 1) | ||
155 | SRCS += lookup_ldap.c | ||
156 | MODS += lookup_ldap.so | ||
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 deleted file mode 100644 index 4516bc5f2..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-modules-replicated-use-sin6.addr-s6_addr32.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
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 deleted file mode 100644 index 3b6bb926a..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-update-kernel-include-files.patch +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
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 deleted file mode 100644 index 113b0a06e..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-use-numeric-protocol-ids-instead-of-protoent-structs.patch +++ /dev/null | |||
@@ -1,471 +0,0 @@ | |||
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 deleted file mode 100644 index 6a1a49e62..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-workaround-missing-GNU-versionsort-extension.patch +++ /dev/null | |||
@@ -1,149 +0,0 @@ | |||
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/0001-systemd-allow-with-systemd-to-take-a-path-arg.patch b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/0001-systemd-allow-with-systemd-to-take-a-path-arg.patch index 742f25de1..742f25de1 100644 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/0001-systemd-allow-with-systemd-to-take-a-path-arg.patch +++ b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/0001-systemd-allow-with-systemd-to-take-a-path-arg.patch | |||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/Makefile.rules-cross.patch b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/Makefile.rules-cross.patch index 7dc7096c2..7dc7096c2 100644 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/Makefile.rules-cross.patch +++ b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/Makefile.rules-cross.patch | |||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.1.0/add-the-needed-stdarg.h.patch b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/add-the-needed-stdarg.h.patch new file mode 100644 index 000000000..fdb906b22 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/add-the-needed-stdarg.h.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | [PATCH] add the needed stdarg.h | ||
2 | |||
3 | Upstream-status: Pending | ||
4 | |||
5 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
6 | --- | ||
7 | lib/defaults.c | 1 + | ||
8 | 1 file changed, 1 insertion(+) | ||
9 | |||
10 | diff --git a/lib/defaults.c b/lib/defaults.c | ||
11 | index 2b03ea2..5728e67 100644 | ||
12 | --- a/lib/defaults.c | ||
13 | +++ b/lib/defaults.c | ||
14 | @@ -16,6 +16,7 @@ | ||
15 | |||
16 | #include <stdlib.h> | ||
17 | #include <stdio.h> | ||
18 | +#include <stdarg.h> | ||
19 | #include <ctype.h> | ||
20 | #include <string.h> | ||
21 | #include <sys/utsname.h> | ||
22 | -- | ||
23 | 1.7.10.4 | ||
24 | |||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-do-not-check-for-modprobe.patch b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/autofs-5.0.7-do-not-check-for-modprobe.patch index af5be6a83..af5be6a83 100644 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-do-not-check-for-modprobe.patch +++ b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/autofs-5.0.7-do-not-check-for-modprobe.patch | |||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-lib-deps.patch b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/autofs-5.0.7-fix-lib-deps.patch index 09fea495d..09fea495d 100644 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-lib-deps.patch +++ b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/autofs-5.0.7-fix-lib-deps.patch | |||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch index 3a878980a..3a878980a 100644 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch +++ b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch | |||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-additional-distros.patch b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/autofs-additional-distros.patch index 6a35843ce..6a35843ce 100644 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-additional-distros.patch +++ b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/autofs-additional-distros.patch | |||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/cross.patch b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/cross.patch index 8f1af625f..8f1af625f 100644 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/cross.patch +++ b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/cross.patch | |||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/fix_disable_ldap.patch b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/fix_disable_ldap.patch index 31c8510a6..31c8510a6 100644 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/fix_disable_ldap.patch +++ b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/fix_disable_ldap.patch | |||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.1.0/force-STRIP-to-emtpy.patch b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/force-STRIP-to-emtpy.patch new file mode 100644 index 000000000..634005bd2 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/force-STRIP-to-emtpy.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | [PATCH] force STRIP to emtpy | ||
2 | |||
3 | otherwise the generate file will be stripped | ||
4 | |||
5 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
6 | --- | ||
7 | Makefile.rules | 2 +- | ||
8 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
9 | |||
10 | diff --git a/Makefile.rules b/Makefile.rules | ||
11 | index 710a2c9..e4334db 100644 | ||
12 | --- a/Makefile.rules | ||
13 | +++ b/Makefile.rules | ||
14 | @@ -31,7 +31,7 @@ LDFLAGS ?= -s | ||
15 | endif | ||
16 | |||
17 | ifdef DONTSTRIP | ||
18 | -STRIP ?= : | ||
19 | +STRIP = : | ||
20 | else | ||
21 | STRIP ?= strip --strip-debug | ||
22 | endif | ||
23 | -- | ||
24 | 1.7.10.4 | ||
25 | |||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/libtirpc-name-clash-backout.patch b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/libtirpc-name-clash-backout.patch index 104724014..e93021d56 100644 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/libtirpc-name-clash-backout.patch +++ b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/libtirpc-name-clash-backout.patch | |||
@@ -1,12 +1,15 @@ | |||
1 | Index: autofs-5.0.7/lib/rpc_subs.c | 1 | --- |
2 | =================================================================== | 2 | lib/rpc_subs.c | 10 ---------- |
3 | --- autofs-5.0.7.orig/lib/rpc_subs.c 2012-07-24 23:05:26.000000000 -0700 | 3 | 1 file changed, 10 deletions(-) |
4 | +++ autofs-5.0.7/lib/rpc_subs.c 2012-10-28 14:47:49.008382116 -0700 | 4 | |
5 | diff --git a/lib/rpc_subs.c b/lib/rpc_subs.c | ||
6 | index 5d6ead0..c7177f2 100644 | ||
7 | --- a/lib/rpc_subs.c | ||
8 | +++ b/lib/rpc_subs.c | ||
5 | @@ -34,16 +34,6 @@ | 9 | @@ -34,16 +34,6 @@ |
6 | #include <pthread.h> | ||
7 | #include <poll.h> | 10 | #include <poll.h> |
8 | 11 | ||
9 | -#ifdef WITH_LIBTIRPC | 12 | #ifdef WITH_LIBTIRPC |
10 | -#undef auth_destroy | 13 | -#undef auth_destroy |
11 | -#define auth_destroy(auth) \ | 14 | -#define auth_destroy(auth) \ |
12 | - do { \ | 15 | - do { \ |
@@ -16,6 +19,10 @@ Index: autofs-5.0.7/lib/rpc_subs.c | |||
16 | - } while (0) | 19 | - } while (0) |
17 | -#endif | 20 | -#endif |
18 | - | 21 | - |
19 | #include "mount.h" | 22 | -#ifdef WITH_LIBTIRPC |
20 | #include "rpc_subs.h" | 23 | const rpcprog_t rpcb_prog = RPCBPROG; |
21 | #include "automount.h" | 24 | const rpcvers_t rpcb_version = RPCBVERS; |
25 | #else | ||
26 | -- | ||
27 | 1.7.10.4 | ||
28 | |||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/libtirpc.patch b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/libtirpc.patch index 04f52c6f0..d68944b45 100644 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/libtirpc.patch +++ b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/libtirpc.patch | |||
@@ -16,11 +16,11 @@ Index: autofs-5.0.7/Makefile.rules | |||
16 | --- autofs-5.0.7.orig/Makefile.rules 2012-10-28 13:17:45.308237022 -0700 | 16 | --- autofs-5.0.7.orig/Makefile.rules 2012-10-28 13:17:45.308237022 -0700 |
17 | +++ autofs-5.0.7/Makefile.rules 2012-10-28 13:21:25.720242803 -0700 | 17 | +++ autofs-5.0.7/Makefile.rules 2012-10-28 13:21:25.720242803 -0700 |
18 | @@ -48,7 +48,7 @@ | 18 | @@ -48,7 +48,7 @@ |
19 | LDFLAGS += -lpthread | 19 | LIBS += -lpthread |
20 | 20 | ||
21 | ifdef TIRPCLIB | 21 | ifdef TIRPCLIB |
22 | -CFLAGS += -I/usr/include/tirpc | 22 | -CFLAGS += -I/usr/include/tirpc |
23 | +CFLAGS += -I=/usr/include/tirpc | 23 | +CFLAGS += -I=/usr/include/tirpc |
24 | LDFLAGS += $(TIRPCLIB) | 24 | LIBS += $(TIRPCLIB) |
25 | endif | 25 | endif |
26 | 26 | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/no-bash.patch b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/no-bash.patch index cf0363527..cf0363527 100644 --- a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/no-bash.patch +++ b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/no-bash.patch | |||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.1.0/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch new file mode 100644 index 000000000..93b76bd66 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.1.0/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | using pkg-config to detect libxml-2.0 and krb5 | ||
2 | |||
3 | Upstream-status: Pending | ||
4 | |||
5 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
6 | --- | ||
7 | configure.in | 16 ++++++++++++++-- | ||
8 | 2 files changed, 14 insertions(+), 2 deletions(-) | ||
9 | |||
10 | diff --git a/configure.in b/configure.in | ||
11 | index 392d122..a3028aa 100644 | ||
12 | --- a/configure.in | ||
13 | +++ b/configure.in | ||
14 | @@ -162,8 +162,20 @@ if test x$enable_sloppy_mount = xyes; then | ||
15 | fi | ||
16 | |||
17 | # LDAP SASL auth needs libxml and Kerberos | ||
18 | -AF_CHECK_LIBXML() | ||
19 | -AF_CHECK_KRB5() | ||
20 | +PKG_CHECK_MODULES(XML, [libxml-2.0],HAVE_LIBXML=1,HAVE_LIBXML=0) | ||
21 | +AC_SUBST([HAVE_LIBXML]) | ||
22 | +XML_FLAGS=$XML_CFLAGS | ||
23 | + | ||
24 | +PKG_CHECK_MODULES(KRB5, [krb5],HAVE_KRB5=1,HAVE_KRB5=0) | ||
25 | +AC_SUBST([HAVE_KRB5]) | ||
26 | +if test "x$HAVE_KRB5" = "x1"; then | ||
27 | + SAVE_CFLAGS=$CFLAGS | ||
28 | + SAVE_LIBS=$LIBS | ||
29 | + CFLAGS="$CFLAGS $KRB5_FLAGS" | ||
30 | + LIBS="$LIBS $KRB5_LIBS" | ||
31 | + | ||
32 | + AC_CHECK_FUNCS([krb5_principal_get_realm]) | ||
33 | +fi | ||
34 | |||
35 | AC_SEARCH_LIBS([versionsort],[]) | ||
36 | if test "$ac_cv_search_versionsort" = "no"; then | ||
37 | -- | ||
38 | 1.7.10.4 | ||
39 | |||
diff --git a/meta-networking/recipes-daemons/autofs/autofs_5.0.7.bb b/meta-networking/recipes-daemons/autofs/autofs_5.0.7.bb deleted file mode 100644 index 966dada54..000000000 --- a/meta-networking/recipes-daemons/autofs/autofs_5.0.7.bb +++ /dev/null | |||
@@ -1,112 +0,0 @@ | |||
1 | SUMMARY = "Kernel based automounter for linux" | ||
2 | SECTION = "base" | ||
3 | LICENSE = "GPL-2.0" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" | ||
5 | |||
6 | PR = "r6" | ||
7 | |||
8 | DEPENDS += "libtirpc flex-native bison-native" | ||
9 | |||
10 | inherit autotools-brokensep systemd | ||
11 | |||
12 | SRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.bz2 \ | ||
13 | file://autofs-5.0.7-fix-nobind-sun-escaped-map-entries.patch \ | ||
14 | file://autofs-5.0.7-fix-use-cache-entry-after-free-mistake.patch \ | ||
15 | file://autofs-5.0.7-fix-ipv6-proximity-calculation.patch \ | ||
16 | file://autofs-5.0.7-fix-parse-buffer-initialization.patch \ | ||
17 | file://autofs-5.0.7-fix-typo-in-automount-8.patch \ | ||
18 | file://autofs-5.0.7-include-usage-in-usage-message.patch \ | ||
19 | file://autofs-5.0.7-dont-wait-forever-to-restart.patch \ | ||
20 | file://autofs-5.0.7-add-timeout-option-description-to-man-page.patch \ | ||
21 | file://autofs-5.0.7-fix-null-map-entry-order-handling.patch \ | ||
22 | file://autofs-5.0.7-make-description-of-default-MOUNT_WAIT-setting-clear.patch \ | ||
23 | file://autofs-5.0.7-configure-in-allow-cross-compilation.patch \ | ||
24 | file://autofs-5.0.7-README-update-mailing-list-subscription-info.patch \ | ||
25 | file://autofs-5.0.7-allow-non-root-user-to-check-status.patch \ | ||
26 | file://autofs-5.0.7-configure-allow-cross-compilation-update.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 \ | ||
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 \ | ||
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 \ | ||
54 | file://autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch \ | ||
55 | file://Makefile.rules-cross.patch \ | ||
56 | file://no-bash.patch \ | ||
57 | file://cross.patch \ | ||
58 | file://libtirpc.patch \ | ||
59 | file://libtirpc-name-clash-backout.patch \ | ||
60 | file://autofs-5.0.7-do-not-check-for-modprobe.patch \ | ||
61 | file://fix_disable_ldap.patch \ | ||
62 | file://autofs-5.0.7-fix-lib-deps.patch \ | ||
63 | file://0001-systemd-allow-with-systemd-to-take-a-path-arg.patch \ | ||
64 | " | ||
65 | |||
66 | SRC_URI[md5sum] = "bc46838dece83c02d800ff144ed9f431" | ||
67 | SRC_URI[sha256sum] = "08c4304d8076dc80c14df559bc5fd821b67ef3457b245f61068bd053d8f94ccc" | ||
68 | |||
69 | inherit update-rc.d pkgconfig | ||
70 | |||
71 | INITSCRIPT_NAME = "autofs" | ||
72 | INITSCRIPT_PARAMS = "defaults" | ||
73 | |||
74 | # FIXME: modules/Makefile has crappy rules that don't obey LDFLAGS | ||
75 | CFLAGS += "${LDFLAGS}" | ||
76 | |||
77 | PACKAGECONFIG[systemd] = "--with-systemd=${systemd_unitdir}/system,--without-systemd,systemd" | ||
78 | |||
79 | PACKAGECONFIG ?= "${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" | ||
80 | |||
81 | EXTRA_OEMAKE = "DONTSTRIP=1" | ||
82 | EXTRA_OECONF += "--disable-mount-locking \ | ||
83 | --enable-ignore-busy --with-openldap=no \ | ||
84 | --with-sasl=no --with-libtirpc=yes \ | ||
85 | --with-path=${STAGING_BINDIR_NATIVE} \ | ||
86 | " | ||
87 | CACHED_CONFIGUREVARS = "ac_cv_path_RANLIB=${RANLIB} \ | ||
88 | ac_cv_path_RPCGEN=rpcgen \ | ||
89 | " | ||
90 | |||
91 | do_configure_prepend () { | ||
92 | sed -e "s:filagdir:flagdir:" -i configure.in | ||
93 | if [ ! -e acinclude.m4 ]; then | ||
94 | cp aclocal.m4 acinclude.m4 | ||
95 | fi | ||
96 | } | ||
97 | |||
98 | do_install_append () { | ||
99 | if [ -d ${D}/run ]; then | ||
100 | rmdir ${D}/run | ||
101 | fi | ||
102 | if [ -d ${D}${localstatedir}/run ]; then | ||
103 | rmdir ${D}${localstatedir}/run | ||
104 | fi | ||
105 | } | ||
106 | |||
107 | INSANE_SKIP_${PN} = "dev-so" | ||
108 | |||
109 | RPROVIDES_${PN} += "${PN}-systemd" | ||
110 | RREPLACES_${PN} += "${PN}-systemd" | ||
111 | RCONFLICTS_${PN} += "${PN}-systemd" | ||
112 | SYSTEMD_SERVICE_${PN} = "autofs.service" | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs_5.1.0.bb b/meta-networking/recipes-daemons/autofs/autofs_5.1.0.bb new file mode 100644 index 000000000..aab218774 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs_5.1.0.bb | |||
@@ -0,0 +1,70 @@ | |||
1 | SUMMARY = "Kernel based automounter for linux" | ||
2 | SECTION = "base" | ||
3 | LICENSE = "GPL-2.0" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" | ||
5 | |||
6 | DEPENDS += "libtirpc flex-native bison-native" | ||
7 | |||
8 | inherit autotools-brokensep systemd | ||
9 | |||
10 | SRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.gz \ | ||
11 | file://autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch \ | ||
12 | file://no-bash.patch \ | ||
13 | file://cross.patch \ | ||
14 | file://libtirpc.patch \ | ||
15 | file://libtirpc-name-clash-backout.patch \ | ||
16 | file://autofs-5.0.7-do-not-check-for-modprobe.patch \ | ||
17 | file://fix_disable_ldap.patch \ | ||
18 | file://autofs-5.0.7-fix-lib-deps.patch \ | ||
19 | file://add-the-needed-stdarg.h.patch \ | ||
20 | file://using-pkg-config-to-detect-libxml-2.0-and-krb5.patch \ | ||
21 | file://force-STRIP-to-emtpy.patch \ | ||
22 | " | ||
23 | |||
24 | SRC_URI[md5sum] = "b7724a9a55923f3c06933a8dfd1e79d3" | ||
25 | SRC_URI[sha256sum] = "794a28d178d2b21a2380ee71cbdb3b15b4be47c06f3de255b8c5c4351f046b26" | ||
26 | |||
27 | inherit update-rc.d pkgconfig | ||
28 | |||
29 | INITSCRIPT_NAME = "autofs" | ||
30 | INITSCRIPT_PARAMS = "defaults" | ||
31 | |||
32 | # FIXME: modules/Makefile has crappy rules that don't obey LDFLAGS | ||
33 | CFLAGS += "${LDFLAGS}" | ||
34 | |||
35 | PACKAGECONFIG[systemd] = "--with-systemd=${systemd_unitdir}/system,--without-systemd,systemd" | ||
36 | |||
37 | PACKAGECONFIG ?= "${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" | ||
38 | |||
39 | EXTRA_OEMAKE = "DONTSTRIP=1" | ||
40 | EXTRA_OECONF += "--disable-mount-locking \ | ||
41 | --enable-ignore-busy --with-openldap=no \ | ||
42 | --with-sasl=no --with-libtirpc=yes \ | ||
43 | --with-path=${STAGING_BINDIR_NATIVE} \ | ||
44 | " | ||
45 | CACHED_CONFIGUREVARS = "ac_cv_path_RANLIB=${RANLIB} \ | ||
46 | ac_cv_path_RPCGEN=rpcgen \ | ||
47 | " | ||
48 | |||
49 | do_configure_prepend () { | ||
50 | sed -e "s:filagdir:flagdir:" -i configure.in | ||
51 | if [ ! -e acinclude.m4 ]; then | ||
52 | cp aclocal.m4 acinclude.m4 | ||
53 | fi | ||
54 | } | ||
55 | |||
56 | do_install_append () { | ||
57 | if [ -d ${D}/run ]; then | ||
58 | rmdir ${D}/run | ||
59 | fi | ||
60 | if [ -d ${D}${localstatedir}/run ]; then | ||
61 | rmdir ${D}${localstatedir}/run | ||
62 | fi | ||
63 | } | ||
64 | |||
65 | INSANE_SKIP_${PN} = "dev-so" | ||
66 | |||
67 | RPROVIDES_${PN} += "${PN}-systemd" | ||
68 | RREPLACES_${PN} += "${PN}-systemd" | ||
69 | RCONFLICTS_${PN} += "${PN}-systemd" | ||
70 | SYSTEMD_SERVICE_${PN} = "autofs.service" | ||