You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

127 lines
3.9 KiB

autofs-5.1.3 - add missing MODPREFIX to logging in amd parser
From: Ian Kent <raven@themaw.net>
Some of the logging in the amd parser is missing the log identifier
MODPREFIX so add it.
Signed-off-by: Ian Kent <raven@themaw.net>
---
CHANGELOG | 1 +
modules/parse_amd.c | 25 ++++++++++++++-----------
2 files changed, 15 insertions(+), 11 deletions(-)
--- autofs-5.0.7.orig/CHANGELOG
+++ autofs-5.0.7/CHANGELOG
@@ -269,6 +269,7 @@
- improve debug logging of lookup key.
- fix cachefs parse message not being logged.
- fix typo in amd_parse.c.
+- add missing MODPREFIX to logging in amd parser.
25/07/2012 autofs-5.0.7
=======================
--- autofs-5.0.7.orig/modules/parse_amd.c
+++ autofs-5.0.7/modules/parse_amd.c
@@ -245,7 +245,7 @@ static int match_my_name(unsigned int lo
}
if (!v || !v->val) {
- error(logopt, "error: ${host} not set");
+ error(logopt, MODPREFIX "error: ${host} not set");
goto out;
}
@@ -259,7 +259,7 @@ static int match_my_name(unsigned int lo
/* Get host canonical name */
ret = getaddrinfo(v->val, NULL, &hints, &cni);
if (ret) {
- error(logopt,
+ error(logopt, MODPREFIX
"hostname lookup failed: %s\n", gai_strerror(ret));
goto out;
}
@@ -269,7 +269,7 @@ static int match_my_name(unsigned int lo
/* Resolve comparison name to its names and compare */
ret = getaddrinfo(name, NULL, &hints, &ni);
if (ret) {
- error(logopt,
+ error(logopt, MODPREFIX
"hostname lookup failed: %s\n", gai_strerror(ret));
freeaddrinfo(cni);
goto out;
@@ -282,7 +282,7 @@ static int match_my_name(unsigned int lo
numeric, sizeof(numeric), NULL, 0,
NI_NUMERICHOST);
if (ret) {
- error(logopt,
+ error(logopt, MODPREFIX
"host address info lookup failed: %s\n",
gai_strerror(ret));
freeaddrinfo(cni);
@@ -293,7 +293,7 @@ static int match_my_name(unsigned int lo
ret = getnameinfo(haddr->ai_addr, haddr->ai_addrlen,
host, NI_MAXHOST, NULL, 0, 0);
if (ret) {
- error(logopt,
+ error(logopt, MODPREFIX
"host address info lookup failed: %s\n",
gai_strerror(ret));
freeaddrinfo(cni);
@@ -330,7 +330,8 @@ static int eval_selector(unsigned int lo
case SEL_FLAG_MACRO:
v = macro_findvar(sv, s->sel->name, strlen(s->sel->name));
if (!v) {
- error(logopt, "failed to get selector %s", s->sel->name);
+ error(logopt, MODPREFIX
+ "failed to get selector %s", s->sel->name);
return 0;
}
@@ -499,7 +500,7 @@ static int eval_selector(unsigned int lo
else
v = macro_findvar(sv, "hostd", 5);
if (!v || !*v->val) {
- error(logopt,
+ error(logopt, MODPREFIX
"failed to get value of ${host}");
break;
}
@@ -666,7 +667,8 @@ static char *normalize_hostname(unsigned
ret = getaddrinfo(host, NULL, &hints, &ni);
if (ret) {
- error(logopt, "hostname lookup failed: %s", gai_strerror(ret));
+ error(logopt, MODPREFIX
+ "hostname lookup failed: %s", gai_strerror(ret));
return NULL;
}
name = strdup(ni->ai_canonname);
@@ -1302,7 +1304,7 @@ static unsigned int validate_generic_opt
* Can't use entry->type as the mount type to reprot
* the error since entry->type == "bind" not "lofs".
*/
- error(logopt, "lofs: mount device not given");
+ error(logopt, MODPREFIX "lofs: mount device not given");
return 0;
} else if (!*entry->rfs)
return 0;
@@ -1575,7 +1577,7 @@ static int match_selectors(unsigned int
/* No selectors, always match */
if (!s) {
- debug(logopt, "no selectors found in location");
+ debug(logopt, MODPREFIX "no selectors found in location");
return 1;
}
@@ -2000,7 +2002,8 @@ int parse_mount(struct autofs_point *ap,
free_amd_entry(cur_defaults);
if (rv)
- debug(ap->logopt, "no more locations to try, returning fail");
+ debug(ap->logopt, MODPREFIX
+ "no more locations to try, returning fail");
done:
free_amd_entry_list(&entries);
free_amd_entry(defaults_entry);