Improve the login.defs unknown item error message
Closes #746 Only print the 'unknown item' message to syslog if we are actually parsing a login.defs. Prefix it with "shadow:" to make it clear in syslog where it came from. Also add the source filename to the console message. I'm not quite clear on the econf API, so not sure whether in that path we will end up actually having the path, or printing ''. Signed-off-by: Serge Hallyn <serge@hallyn.com>
This commit is contained in:
@@ -429,7 +429,7 @@ static void process_flags (int argc, char **argv)
|
||||
}
|
||||
/* terminate name, point to value */
|
||||
*cp++ = '\0';
|
||||
if (putdef_str (optarg, cp) < 0) {
|
||||
if (putdef_str (optarg, cp, NULL) < 0) {
|
||||
exit (E_BAD_ARG);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1399,7 +1399,7 @@ static void process_flags (int argc, char **argv)
|
||||
/* terminate name, point to value */
|
||||
*cp = '\0';
|
||||
cp++;
|
||||
if (putdef_str (optarg, cp) < 0) {
|
||||
if (putdef_str (optarg, cp, NULL) < 0) {
|
||||
exit (E_BAD_ARG);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user