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
7e1c2e33be
commit
f9eaa746eb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=94897
@ -67,8 +67,10 @@ extern char *tempname;
|
|||||||
static pid_t editpid = -1;
|
static pid_t editpid = -1;
|
||||||
static int lockfd;
|
static int lockfd;
|
||||||
static char _default_editor[] = _PATH_VI;
|
static char _default_editor[] = _PATH_VI;
|
||||||
char mppath[] = _PATH_PWD;
|
static char _default_mppath[] = _PATH_PWD;
|
||||||
char masterpasswd[] = _PATH_MASTERPASSWD;
|
static char _default_masterpasswd[] = _PATH_MASTERPASSWD;
|
||||||
|
char *mppath = _default_mppath;
|
||||||
|
char *masterpasswd = _default_masterpasswd;
|
||||||
|
|
||||||
void pw_cont(int);
|
void pw_cont(int);
|
||||||
|
|
||||||
|
@ -67,8 +67,10 @@ extern char *tempname;
|
|||||||
static pid_t editpid = -1;
|
static pid_t editpid = -1;
|
||||||
static int lockfd;
|
static int lockfd;
|
||||||
static char _default_editor[] = _PATH_VI;
|
static char _default_editor[] = _PATH_VI;
|
||||||
char mppath[] = _PATH_PWD;
|
static char _default_mppath[] = _PATH_PWD;
|
||||||
char masterpasswd[] = _PATH_MASTERPASSWD;
|
static char _default_masterpasswd[] = _PATH_MASTERPASSWD;
|
||||||
|
char *mppath = _default_mppath;
|
||||||
|
char *masterpasswd = _default_masterpasswd;
|
||||||
|
|
||||||
void pw_cont(int);
|
void pw_cont(int);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user