diff options
| author | Guido van Rooij <guido@FreeBSD.org> | 1996-07-01 19:38:50 +0000 |
|---|---|---|
| committer | Guido van Rooij <guido@FreeBSD.org> | 1996-07-01 19:38:50 +0000 |
| commit | 79a1b8d9e283a5f920de2e3585aaa2108be1ff78 (patch) | |
| tree | 4bfb5d9e29eba41cf2d104fc69a77e860b476e6b /lib/libutil/pw_util.c | |
| parent | a111a7f827d4196a1f0b61f81a8d2d3d8dbf9a06 (diff) | |
Notes
Diffstat (limited to 'lib/libutil/pw_util.c')
| -rw-r--r-- | lib/libutil/pw_util.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/libutil/pw_util.c b/lib/libutil/pw_util.c index 60b4f77bf253..7ebe86ee63ed 100644 --- a/lib/libutil/pw_util.c +++ b/lib/libutil/pw_util.c @@ -138,7 +138,8 @@ pw_tmp() } int -pw_mkdb() +pw_mkdb(username) +char *username; { int pstat; pid_t pid; @@ -146,7 +147,12 @@ pw_mkdb() warnx("rebuilding the database..."); (void)fflush(stderr); if (!(pid = vfork())) { - execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", tempname, NULL); + if(!username) { + execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", tempname, NULL); + } else { + execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", "-u", + username, tempname, NULL); + } pw_error(_PATH_PWD_MKDB, 1, 1); } pid = waitpid(pid, &pstat, 0); |
