From owner-freebsd-current Mon Apr 16 22:49:10 2001 Delivered-To: freebsd-current@freebsd.org Received: from bazooka.unixfreak.org (bazooka.unixfreak.org [63.198.170.138]) by hub.freebsd.org (Postfix) with ESMTP id 10BBE37B424; Mon, 16 Apr 2001 22:49:08 -0700 (PDT) (envelope-from dima@unixfreak.org) Received: from spike.unixfreak.org (spike [63.198.170.139]) by bazooka.unixfreak.org (Postfix) with ESMTP id CA7C83E09; Mon, 16 Apr 2001 22:49:07 -0700 (PDT) To: current@freebsd.org Cc: kris@freebsd.org Subject: Cosmetic bug in pw_util.c (with patch) Date: Mon, 16 Apr 2001 22:49:07 -0700 From: Dima Dorfman Message-Id: <20010417054907.CA7C83E09@bazooka.unixfreak.org> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Revision 1.18 of pw_util.c (fix for security advisory "chpass" 00:58) introduces a cosmetic bug which manifests itself as such: > passwd Changing local password for dima. Old password: passwd: (null): Permission denied ^^^^^^^^^ passwd: /etc/master.passwd: unchanged Only machines *not* using NIS will display this, since passwd(1) acts differently when changing an NIS password. Trivial patch to fix this is attached below. Thanks, Dima Dorfman dima@unixfreak.org Index: pw_util.c =================================================================== RCS file: /st/src/FreeBSD/src/usr.sbin/vipw/pw_util.c,v retrieving revision 1.18 diff -u -r1.18 pw_util.c --- pw_util.c 2000/07/12 00:49:40 1.18 +++ pw_util.c 2001/04/17 05:41:38 @@ -249,8 +249,12 @@ #ifdef YP extern int _use_yp; #endif /* YP */ - if (err) - warn("%s", name); + if (err) { + if (name != NULL) + warn("%s", name); + else + warn(NULL); + } #ifdef YP if (_use_yp) warnx("NIS information unchanged"); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message