* (also used when loading the initial defaults)
*/
-int putdef_str (const char *name, const char *value)
+int putdef_str (const char *name, const char *value, const char *srcfile)
{
struct itemdef *d;
char *cp;
*/
d = def_find (name);
if (NULL == d) {
+ if (NULL != srcfile)
+ SYSLOG ((LOG_CRIT, "shadow: unknown configuration item '%s' in '%s'", name, srcfile));
return -1;
}
fprintf (shadow_logfd,
_("configuration error - unknown item '%s' (notify administrator)\n"),
name);
- SYSLOG ((LOG_CRIT, "unknown configuration item `%s'", name));
out:
return NULL;
* The error was already reported to the user and to
* syslog. The tools will just use their default values.
*/
- (void)putdef_str (keys[i], value);
+ (void)putdef_str (keys[i], value, econf_getPath(defs_file));
free(value);
}
* The error was already reported to the user and to
* syslog. The tools will just use their default values.
*/
- (void)putdef_str (name, value);
+ (void)putdef_str (name, value, def_fname);
}
if (ferror (fp) != 0) {
extern unsigned long getdef_ulong (const char *, unsigned long);
extern unsigned int getdef_unum (const char *, unsigned int);
extern /*@observer@*/ /*@null@*/const char *getdef_str (const char *);
-extern int putdef_str (const char *, const char *);
+extern int putdef_str (const char *, const char *, const char *);
extern void setdef_config_file (const char* file);
/* default UMASK value if not specified in /etc/login.defs */
}
/* 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;
/* 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;