|
|
d5dcad |
autofs-5.1.5 - fix hesiod string check in master_parse()
|
|
|
d5dcad |
|
|
|
d5dcad |
From: Ian Kent <raven@themaw.net>
|
|
|
d5dcad |
|
|
|
d5dcad |
When map source is specified in a master map entry, checking if
|
|
|
d5dcad |
map type is hesiod in master_parse() will generate a SEGV if a
|
|
|
d5dcad |
parser type is not also present becuase tmp will be NULL in this
|
|
|
d5dcad |
case.
|
|
|
d5dcad |
|
|
|
d5dcad |
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
|
d5dcad |
---
|
|
|
d5dcad |
CHANGELOG | 1 +
|
|
|
d5dcad |
lib/master_parse.y | 8 ++++----
|
|
|
d5dcad |
2 files changed, 5 insertions(+), 4 deletions(-)
|
|
|
d5dcad |
|
|
|
d5dcad |
--- autofs-5.1.4.orig/CHANGELOG
|
|
|
d5dcad |
+++ autofs-5.1.4/CHANGELOG
|
|
|
d5dcad |
@@ -37,6 +37,7 @@ xx/xx/2018 autofs-5.1.5
|
|
|
d5dcad |
- fix incorrect locking in sss lookup.
|
|
|
d5dcad |
- fix amd parser opts option handling.
|
|
|
d5dcad |
- better handle hesiod support not built in.
|
|
|
d5dcad |
+- fix hesiod string check in master_parse().
|
|
|
d5dcad |
|
|
|
d5dcad |
19/12/2017 autofs-5.1.4
|
|
|
d5dcad |
- fix spec file url.
|
|
|
d5dcad |
--- autofs-5.1.4.orig/lib/master_parse.y
|
|
|
d5dcad |
+++ autofs-5.1.4/lib/master_parse.y
|
|
|
d5dcad |
@@ -172,8 +172,8 @@ line:
|
|
|
d5dcad |
if ((tmp = strchr($2, ',')))
|
|
|
d5dcad |
*tmp++ = '\0';
|
|
|
d5dcad |
#ifndef WITH_HESIOD
|
|
|
d5dcad |
- /* Map type or or map type parser is hesiod */
|
|
|
d5dcad |
- if (!strcmp($2, "hesiod") || !strcmp(tmp, "hesiod")) {
|
|
|
d5dcad |
+ /* Map type or map type parser is hesiod */
|
|
|
d5dcad |
+ if (!strcmp($2, "hesiod") || (tmp && !strcmp(tmp, "hesiod"))) {
|
|
|
d5dcad |
master_error("hesiod support not built in");
|
|
|
d5dcad |
local_free_vars();
|
|
|
d5dcad |
YYABORT;
|
|
|
d5dcad |
@@ -360,8 +360,8 @@ map: PATH
|
|
|
d5dcad |
if ((tmp = strchr($1, ',')))
|
|
|
d5dcad |
*tmp++ = '\0';
|
|
|
d5dcad |
#ifndef WITH_HESIOD
|
|
|
d5dcad |
- /* Map type or or map type parser is hesiod */
|
|
|
d5dcad |
- if (!strcmp($1, "hesiod") || !strcmp(tmp, "hesiod")) {
|
|
|
d5dcad |
+ /* Map type or map type parser is hesiod */
|
|
|
d5dcad |
+ if (!strcmp($1, "hesiod") || (tmp && !strcmp(tmp, "hesiod"))) {
|
|
|
d5dcad |
master_error("hesiod support not built in");
|
|
|
d5dcad |
local_free_vars();
|
|
|
d5dcad |
YYABORT;
|