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:
Dag-Erling Smørgrav 2002-04-17 00:18:15 +00:00
parent 7e1c2e33be
commit f9eaa746eb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=94897
2 changed files with 8 additions and 4 deletions

View File

@ -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);

View File

@ -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);