From owner-freebsd-bugs Sun Apr 27 13:50:04 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id NAA28262 for bugs-outgoing; Sun, 27 Apr 1997 13:50:04 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.5/8.8.5) id NAA28256; Sun, 27 Apr 1997 13:50:02 -0700 (PDT) Resent-Date: Sun, 27 Apr 1997 13:50:02 -0700 (PDT) Resent-Message-Id: <199704272050.NAA28256@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, taob@risc.org Received: from alpha.risc.org (taob@209-20-0-29.dialin.interlog.com [209.20.0.29]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id NAA28158 for ; Sun, 27 Apr 1997 13:47:52 -0700 (PDT) Received: (from taob@localhost) by alpha.risc.org (8.8.4/8.8.4) id QAA10058; Sun, 27 Apr 1997 16:47:28 -0400 (EDT) Message-Id: <199704272047.QAA10058@alpha.risc.org> Date: Sun, 27 Apr 1997 16:47:28 -0400 (EDT) From: taob@risc.org Reply-To: taob@risc.org To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/3397: More accurate vipw/chpass/passwd message Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >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: