diff options
Diffstat (limited to 'lib/getdef.c')
-rw-r--r-- | lib/getdef.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/getdef.c b/lib/getdef.c index a181cc2b..d57b12de 100644 --- a/lib/getdef.c +++ b/lib/getdef.c @@ -155,7 +155,7 @@ static struct itemdef knowndef_table[] = { #define LOGINDEFS "/etc/login.defs" #endif -static char def_fname[] = LOGINDEFS; /* login config defs file */ +static const char* def_fname = LOGINDEFS; /* login config defs file */ static bool def_loaded = false; /* are defs already loaded? */ /* local function prototypes */ @@ -425,6 +425,17 @@ out: } /* + * setdef_config_file - set the default configuration file path + * + * must be called prior to any def* calls. + */ + +void setdef_config_file (const char* file) +{ + def_fname = file; +} + +/* * def_load - load configuration table * * Loads the user-configured options from the default configuration file |