getdefs: add foreign (non-shadow-utils) items
The login.defs is shared between more upstream projects (util-linux, etc.). We need to improve compatibility between the projects do not report valid, but foreign items. Addresses: https://github.com/shadow-maint/shadow/issues/276 Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
e84df9e163
commit
3f09f7b6fb
12
lib/getdef.c
12
lib/getdef.c
@ -77,6 +77,16 @@ struct itemdef {
|
|||||||
{"SU_WHEEL_ONLY", NULL}, \
|
{"SU_WHEEL_ONLY", NULL}, \
|
||||||
{"ULIMIT", NULL},
|
{"ULIMIT", NULL},
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Items used in other tools (util-linux, etc.)
|
||||||
|
*/
|
||||||
|
#define FOREIGNDEFS \
|
||||||
|
{"ALWAYS_SET_PATH", NULL}, \
|
||||||
|
{"ENV_ROOTPATH", NULL}, \
|
||||||
|
{"LOGIN_KEEP_USERNAME", NULL}, \
|
||||||
|
{"LOGIN_PLAIN_PROMPT", NULL}, \
|
||||||
|
{"MOTD_FIRSTONLY", NULL}, \
|
||||||
|
|
||||||
|
|
||||||
#define NUMDEFS (sizeof(def_table)/sizeof(def_table[0]))
|
#define NUMDEFS (sizeof(def_table)/sizeof(def_table[0]))
|
||||||
static struct itemdef def_table[] = {
|
static struct itemdef def_table[] = {
|
||||||
@ -158,6 +168,7 @@ static struct itemdef knowndef_table[] = {
|
|||||||
#ifdef USE_PAM
|
#ifdef USE_PAM
|
||||||
PAMDEFS
|
PAMDEFS
|
||||||
#endif
|
#endif
|
||||||
|
FOREIGNDEFS
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -414,7 +425,6 @@ static /*@observer@*/ /*@null@*/struct itemdef *def_find (const char *name)
|
|||||||
{
|
{
|
||||||
struct itemdef *ptr;
|
struct itemdef *ptr;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Search into the table.
|
* Search into the table.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user