From owner-svn-src-head@freebsd.org Mon Jul 23 14:59:59 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D4C4104D1C6 for ; Mon, 23 Jul 2018 14:59:59 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 949727FF5F for ; Mon, 23 Jul 2018 14:59:58 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 0f4c867f-8e89-11e8-904b-1d2e466b3c59 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 0f4c867f-8e89-11e8-904b-1d2e466b3c59; Mon, 23 Jul 2018 14:59:55 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6NExtUh013168; Mon, 23 Jul 2018 08:59:55 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532357995.1344.132.camel@freebsd.org> Subject: Re: svn commit: r336625 - head/usr.sbin/pw From: Ian Lepore To: Alan Somers Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 23 Jul 2018 08:59:55 -0600 In-Reply-To: References: <201807222341.w6MNfeDa065288@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jul 2018 14:59:59 -0000 On Mon, 2018-07-23 at 08:53 -0600, Alan Somers wrote: > On Sun, Jul 22, 2018 at 5:41 PM, Ian Lepore wrote: > > > > > Author: ian > > Date: Sun Jul 22 23:41:40 2018 > > New Revision: 336625 > > URL: https://svnweb.freebsd.org/changeset/base/336625 > > > > Log: > >   Make pw(8) showuser work the same with or without -R for > > non-root > >   users.  Without -R, pw(8) uses getpwnam(3), which will open > > master.passwd > >   for the root user or passwd for non-root users.  With -R > > pw(8) was > >   always opening /master.passwd, which would fail for a non- > > root > > user, > >   then falsely claim the userid you're trying to show doesn't > > exist. > > > >   Now for a non-root user it opens /passwd and zeroes out the > > 3 > > fields > >   that aren't available in the passwd file, which duplicates the > > behavior > > of > >   getpwnam(3).  The net effect is that the showuser output is > > identical > >   whether using -R or not. > > > > Modified: > >   head/usr.sbin/pw/pw_vpw.c > > > It looks like this change has broken approximately all of pw's tests. > Please fix or revert it ASAP. > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/8320/testReport/ > > BTW, you can easily run these tests by hand, rather than wait for > Jenkins > to do it. If you're not familiar with Kyua/atf, you can do it like > this: > 1) sudo pkg install kyua > 2) cd /usr/tests/usr.sbin/pw > 3) sudo kyua test > 4) sudo kyua report > > -Alan Hrm, it worked with the admittedly simplistic testing I did by hand. I'll look into running the kyua tests and see what's going on; until I get that worked out, it's reverted in r336638. Sorry for the breakage. -- Ian