add --prefix option

This commit is contained in:
fariouche
2016-05-15 15:49:39 +02:00
parent db57db52cf
commit b6b2c756c9
20 changed files with 766 additions and 93 deletions

View File

@@ -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 */
@@ -424,6 +424,17 @@ out:
return (struct itemdef *) NULL;
}
/*
* 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
*