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