version 1.5, 1996/09/23 05:40:47 |
version 1.6, 1996/10/20 23:45:50 |
|
|
/* Get the passwd lock file and open the passwd file for reading. */ |
/* Get the passwd lock file and open the passwd file for reading. */ |
pw_init(); |
pw_init(); |
tfd = pw_lock(0); |
tfd = pw_lock(0); |
if (tfd < 0) |
if (tfd < 0) { |
errx(1, "the passwd file is busy."); |
if (errno == EEXIST) |
|
errx(1, "the passwd file is busy."); |
|
else |
|
err(1, "can't open passwd temp file"); |
|
} |
pfd = open(_PATH_MASTERPASSWD, O_RDONLY, 0); |
pfd = open(_PATH_MASTERPASSWD, O_RDONLY, 0); |
if (pfd < 0) |
if (pfd < 0) |
pw_error(_PATH_MASTERPASSWD, 1, 1); |
pw_error(_PATH_MASTERPASSWD, 1, 1); |