From owner-freebsd-current@freebsd.org Fri Jul 27 15:22:26 2018 Return-Path: Delivered-To: freebsd-current@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 A99F6104E49C for ; Fri, 27 Jul 2018 15:22:26 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (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 3818C79D6E for ; Fri, 27 Jul 2018 15:22:25 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: d7f9e1bd-91b0-11e8-aff6-0b9b8210da61 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 outbound1.eu.mailhop.org (Halon) with ESMTPSA id d7f9e1bd-91b0-11e8-aff6-0b9b8210da61; Fri, 27 Jul 2018 15:22:17 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6RFMFl6023715; Fri, 27 Jul 2018 09:22:15 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532704935.61594.42.camel@freebsd.org> Subject: Re: svn commit: r336751 - head/usr.sbin/pw From: Ian Lepore To: Li-Wen Hsu Cc: freebsd-current@FreeBSD.org Date: Fri, 27 Jul 2018 09:22:15 -0600 In-Reply-To: <20180727144355.GA47251@freefall.freebsd.org> References: <201807262003.w6QK3B7E026934@repo.freebsd.org> <20180727144355.GA47251@freefall.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: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jul 2018 15:22:26 -0000 On Fri, 2018-07-27 at 14:43 +0000, Li-Wen Hsu wrote: > On Thu, Jul 26, 2018 at 20:03:11 +0000, Ian Lepore wrote: > > > > Author: ian > > Date: Thu Jul 26 20:03:11 2018 > > New Revision: 336751 > > URL: https://svnweb.freebsd.org/changeset/base/336751 > > > > Log: > >   Re-apply r336625 which was reverted with r336638, now that the underlying > >   pw_scan(3) has been fixed in a way that doesn't perturb other callers of > >   it or the getpwnam(3) family. > >    > >   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 populates the fields in > >   the returned struct passwd which aren't present in that file with well-known > >   canonical values, 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 > Hi Ian, > > It seems usr.sbin.pw.* tests are failing after this commit: > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/8367/testReport/ > > Can you help me check this is realted to the new pw code or there is > anything we need to modify in the test VM setup or running environment. > > The related artifacts are available here: > > https://artifact.ci.freebsd.org/snapshot/head/r336751/amd64/amd64/ > > You can use disk-test.img.xz which is a VM with setup testing > environment.  The build script will start automatically but you can > ctrl-c to interrupt anytime and run tests by hand: > > cd /usr/tests/usr.sbin/pw > kyua test This was just an error on my part, the code was wrong and I fixed it in r336762. This time I made sure the kyua tests pass first. I had intended to run the kyua tests before and after re-applying my changes to pw(8). Now that I look in my scrollback, it seems I ran the "before" tests, then got distracted and forgot to run them again after and just committed the changes. Sorry about the breakage. -- Ian