shadow-maint/shadow

shadow 4.15.0 complains about unknown configuration option

jubalh opened this issue · 6 comments

Running useradd we get the following logged:

usermod[2998]: shadow: unknown configuration item 'MOTD_FILE' in '/usr/etc/login.defs'                     
usermod[2998]: shadow: unknown configuration item 'ENV_ROOTPATH' in '/usr/etc/login.defs'                  
usermod[2998]: shadow: unknown configuration item 'ALWAYS_SET_PATH' in '/usr/etc/login.defs'
usermod[2998]: shadow: unknown configuration item 'LOGIN_KEEP_USERNAME' in '/usr/etc   

With 4.14.6 this doesn't happen.
Might be related to #814 / fa68441?

openQA Test.

goto out;

This sounds weird in this context

i.e if the entry to be checked is in knowndef_table (combination of PAMDEFS and FOREIGNDEFS) we jump to 'out - then return NULL

putdef_str though takes NULL as 'not found in the table'

        d = def_find (name);
        if (NULL == d) {
                if (NULL != srcfile)
                        SYSLOG ((LOG_CRIT, "shadow: unknown configuration item '%s' in '%s'", name, srcfile));
                return -1;
        }

find_def should likely rather return ptr instead of NULL?

originally introduced here 71c6165

i.e we already had a log function for (partially) unknown / external util entries.

Might be related to #814 / fa68441?

Maybe @hallyn knows.

This issue has also been reported for Fedora. I put it here for the sake of it .

Hm, the only nuisance I see here is:

useradd: failed to reset the lastlog entry of UID 1003: Success

Still trying to make sense of the unknown configuration message...

Oh, @DimStar77 , thank you - yes, that's the problem here. That fix was undone. (That's the passive way of saying - I undid it :)