shadow-maint / shadow

Upstream shadow tree
Other
290 stars 228 forks source link

getdef: avoid spurious error messages about unknown configuration opt… #976

Closed hallyn closed 4 months ago

hallyn commented 4 months ago

…ions

def_find can return NULL for unset, not just unknown, config options. So move the decision of whether to log an error message about an unknown config option back into def_find, which knows the difference. Only putdef_str() will pass a char* srcfile to def_find, so only calls from putdef_str will cause the message, which was the original intent of fa68441bc4be8.

closes #967

fixes: fa68441bc4be8 ("Improve the login.defs unknown item error message")

ikerexxe commented 4 months ago

LGTM! And it works as expected, so I'm merging it. Thank you Serge!