Make mppath and masterpasswd pointers instead of arrays, and initialize
them to point at static strings that contain the default paths. This makes 'vipw -d' work again (I broke it in rev 1.21; apologies for taking so long to fix it.) Spotted by: Olivier Houchard <doginou@cognet.ci0.org> Sponsored by: DARPA, NAI Labs
This commit is contained in:
parent
f84972208c
commit
e914cc2fa2
@ -67,8 +67,10 @@ extern char *tempname;
|
||||
static pid_t editpid = -1;
|
||||
static int lockfd;
|
||||
static char _default_editor[] = _PATH_VI;
|
||||
char mppath[] = _PATH_PWD;
|
||||
char masterpasswd[] = _PATH_MASTERPASSWD;
|
||||
static char _default_mppath[] = _PATH_PWD;
|
||||
static char _default_masterpasswd[] = _PATH_MASTERPASSWD;
|
||||
char *mppath = _default_mppath;
|
||||
char *masterpasswd = _default_masterpasswd;
|
||||
|
||||
void pw_cont(int);
|
||||
|
||||
|
@ -67,8 +67,10 @@ extern char *tempname;
|
||||
static pid_t editpid = -1;
|
||||
static int lockfd;
|
||||
static char _default_editor[] = _PATH_VI;
|
||||
char mppath[] = _PATH_PWD;
|
||||
char masterpasswd[] = _PATH_MASTERPASSWD;
|
||||
static char _default_mppath[] = _PATH_PWD;
|
||||
static char _default_masterpasswd[] = _PATH_MASTERPASSWD;
|
||||
char *mppath = _default_mppath;
|
||||
char *masterpasswd = _default_masterpasswd;
|
||||
|
||||
void pw_cont(int);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user