Date: Sun, 27 Apr 1997 16:47:28 -0400 (EDT) From: taob@risc.org To: FreeBSD-gnats-submit@freebsd.org Subject: bin/3397: More accurate vipw/chpass/passwd message Message-ID: <199704272047.QAA10058@alpha.risc.org> Resent-Message-ID: <199704272050.NAA28256@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 3397
>Category: bin
>Synopsis: vipw does not distinguish between rebuilding and updating *pwd.db
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Apr 27 13:50:01 PDT 1997
>Last-Modified:
>Originator: Brian Tao
>Organization:
>Release: FreeBSD 2.2-970420-RELENG i386
>Environment:
Any FreeBSD release with guido's incremental db update code to
/usr/src/usr.sbin/pwd_mkdb/pwd_mkdb.c (July 1 1996).
>Description:
vipw's /usr/src/usr.sbin/vipw/pw_util.c will say "rebuilding the
database..." regardless of whether it is completely rebuilding the
databases or just updating a single entry. This is just a cosmetic
fix.
>How-To-Repeat:
vipw will rebuild the entire database, chpass et al. only update
the changed user's entry.
>Fix:
Note that vipw, chpass and passwd all need to be rebuilt after
this patch.
*** /usr/src/usr.sbin/vipw/pw_util.c.orig Sun Apr 27 16:08:59 1997
--- /usr/src/usr.sbin/vipw/pw_util.c Sun Apr 27 16:09:00 1997
***************
*** 144,155 ****
int pstat;
pid_t pid;
- warnx("rebuilding the database...");
(void)fflush(stderr);
if (!(pid = vfork())) {
if(!username) {
execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", tempname, NULL);
} else {
execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", "-u",
username, tempname, NULL);
}
--- 144,156 ----
int pstat;
pid_t pid;
(void)fflush(stderr);
if (!(pid = vfork())) {
if(!username) {
+ warnx("rebuilding the database...");
execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", tempname, NULL);
} else {
+ warnx("updating the database...");
execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", "-u",
username, tempname, NULL);
}
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704272047.QAA10058>
