Don't crash on bogus keys in login.defs if PAM is enabled

Without this patch, PAM enabled builds crash when encountering an
invalid key in login.defs or key overrides because of array overflows

To reproduce, simply
	useradd -K Windows=broken

Signed-off-by: Bernhard Rosenkränzer <bero@lindev.ch>
Signed-off-by: Serge Hallyn <serge@hallyn.com>
This commit is contained in:
Bernhard Rosenkränzer 2017-01-26 16:48:48 +01:00 committed by Serge Hallyn
parent 6a750c7a50
commit c33ceddc26

View File

@ -148,6 +148,7 @@ static struct itemdef knowndef_table[] = {
#ifdef USE_PAM
PAMDEFS
#endif
{NULL, NULL}
};
#ifndef LOGINDEFS