]> git.pld-linux.org Git - packages/autofs.git/blob - autofs-5.0.8-fix-master-map-type-check.patch
- updated to 5.0.8
[packages/autofs.git] / autofs-5.0.8-fix-master-map-type-check.patch
1 autofs-5.0.8 - fix master map type check
2
3 From: Ian Kent <ikent@redhat.com>
4
5 Map type has format <type>[,<format>] but the master map type check
6 for old style map syntax doesn't allow for <format>.
7 ---
8  CHANGELOG       |    1 +
9  daemon/lookup.c |   24 ++++++++++++++++--------
10  2 files changed, 17 insertions(+), 8 deletions(-)
11
12 diff --git a/CHANGELOG b/CHANGELOG
13 index a45ca6a..fb2f2d6 100644
14 --- a/CHANGELOG
15 +++ b/CHANGELOG
16 @@ -1,6 +1,7 @@
17  ??/??/20?? autofs-5.0.9
18  =======================
19  - fix undefined authtype_requires_creds err if ldap enabled but without sasl.
20 +- fix master map type check.
21  
22  17/10/2013 autofs-5.0.8
23  =======================
24 diff --git a/daemon/lookup.c b/daemon/lookup.c
25 index e3d9536..7fea942 100644
26 --- a/daemon/lookup.c
27 +++ b/daemon/lookup.c
28 @@ -171,14 +171,22 @@ int lookup_nss_read_master(struct master *master, time_t age)
29                         char source[10];
30  
31                         memset(source, 0, 10);
32 -                       if (!strncmp(name, "file:", 5) ||
33 -                           !strncmp(name, "yp:", 3) ||
34 -                           !strncmp(name, "nis:", 4) ||
35 -                           !strncmp(name, "nisplus:", 8) ||
36 -                           !strncmp(name, "ldap:", 5) ||
37 -                           !strncmp(name, "ldaps:", 6) ||
38 -                           !strncmp(name, "sss:", 4) ||
39 -                           !strncmp(name, "dir:", 4)) {
40 +                       if ((!strncmp(name, "file", 4) &&
41 +                                (name[4] == ',' || name[4] == ':')) ||
42 +                           (!strncmp(name, "yp", 3) &&
43 +                                (name[3] == ',' || name[3] == ':')) ||
44 +                           (!strncmp(name, "nis", 3) &&
45 +                                (name[3] == ',' || name[3] == ':')) ||
46 +                           (!strncmp(name, "nisplus", 7) &&
47 +                                (name[7] == ',' || name[7] == ':')) ||
48 +                           (!strncmp(name, "ldap", 4) &&
49 +                                (name[4] == ',' || name[4] == ':')) ||
50 +                           (!strncmp(name, "ldaps", 5) &&
51 +                                (name[5] == ',' || name[5] == ':')) ||
52 +                           (!strncmp(name, "sss", 3) ||
53 +                                (name[3] == ',' || name[3] == ':')) ||
54 +                           (!strncmp(name, "dir", 3) &&
55 +                                (name[3] == ',' || name[3] == ':'))) {
56                                 strncpy(source, name, tmp - name);
57  
58                                 /*
This page took 0.059942 seconds and 3 git commands to generate.