From d1161f6e65493448d4b2935a0eb69ebdeaea8f3f Mon Sep 17 00:00:00 2001 From: provos Date: Tue, 18 Feb 1997 23:38:58 +0000 Subject: [PATCH] open master.passwd before doing pw_copy --- libexec/rpc.yppasswdd/yppasswdd_mkpw.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libexec/rpc.yppasswdd/yppasswdd_mkpw.c b/libexec/rpc.yppasswdd/yppasswdd_mkpw.c index 2c2846d359e..fdcb84d082f 100644 --- a/libexec/rpc.yppasswdd/yppasswdd_mkpw.c +++ b/libexec/rpc.yppasswdd/yppasswdd_mkpw.c @@ -30,12 +30,13 @@ */ #ifndef LINT -static char rcsid[] = "$Id: yppasswdd_mkpw.c,v 1.11 1997/02/18 22:44:49 provos Exp $"; +static char rcsid[] = "$Id: yppasswdd_mkpw.c,v 1.12 1997/02/18 23:38:58 provos Exp $"; #endif #include #include #include +#include #include #include #include @@ -117,6 +118,10 @@ make_passwd(argp) return (1); } + pfd = open(_PATH_MASTERPASSWD, O_RDONLY, 0); + if (pfd < 0) + pw_error(_PATH_MASTERPASSWD, 1, 1); + pw_init(); tfd = pw_lock(0); -- 2.20.1