From owner-freebsd-bugs Mon Sep 2 3:10:14 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 29B4B37B400 for ; Mon, 2 Sep 2002 03:10:07 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC63F43E3B for ; Mon, 2 Sep 2002 03:10:06 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g82AA6JU001182 for ; Mon, 2 Sep 2002 03:10:06 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g82AA6Zg001180; Mon, 2 Sep 2002 03:10:06 -0700 (PDT) Date: Mon, 2 Sep 2002 03:10:06 -0700 (PDT) Message-Id: <200209021010.g82AA6Zg001180@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Mike Makonnen Subject: Re: i386/42315: chpass bug Reply-To: Mike Makonnen Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR i386/42315; it has been noted by GNATS. From: Mike Makonnen To: Jay Chuang Cc: freebsd-gnats-submit@FreeBSD.ORG, des@FreeBSD.ORG Subject: Re: i386/42315: chpass bug Date: Mon, 02 Sep 2002 03:21:16 -0700 [CCing des@freebsd.org] On Mon, 02 Sep 2002 00:47:01 -0700 (PDT) Jay Chuang wrote: Speaking for myself, please include a brief description of the problem in the future. > > >Fix: > bug 1 Fix : change function strchr to strrch Looks like this one was a typo by des in src/usr.sbin/vipw/pw_util.c,v 1.17.2.3 2002/07/14 13:12:04 des Exp $ Index: usr.sbin/vipw/pw_util.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/vipw/Attic/pw_util.c,v retrieving revision 1.17.2.3 diff -u -r1.17.2.3 pw_util.c --- usr.sbin/vipw/pw_util.c 14 Jul 2002 13:12:04 -0000 1.17.2.3 +++ usr.sbin/vipw/pw_util.c 2 Sep 2002 10:10:34 -0000 @@ -148,7 +148,7 @@ int fd; char *p; - if ((p = strchr(masterpasswd, '/')) == NULL) + if ((p = strrchr(masterpasswd, '/')) == NULL) strcpy(path, "pw.XXXXXX"); else if (snprintf(path, sizeof path, "%.*s/pw.XXXXXX", > > bug 1 Fix : add "old_pw = *pw;" after line 215 Upgrade to RELENG_4 (stable) or alternately retrieve src/usr.bin/chpass/chpass.c,v 1.16.2.3 2002/07/12 05:33:34 cjc Exp $ which, I believe has a better fix. This was fixed after 4.6.2 RELEASE. Cheers, Mike Makonnen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message