Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jul 2018 08:53:44 -0600
From:      Alan Somers <asomers@freebsd.org>
To:        Ian Lepore <ian@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r336625 - head/usr.sbin/pw
Message-ID:  <CAOtMX2iaQeeTrBi%2B_muJPjoMQ2d9aYXLpxmm7cyhwne1ELwkrg@mail.gmail.com>
In-Reply-To: <201807222341.w6MNfeDa065288@repo.freebsd.org>
References:  <201807222341.w6MNfeDa065288@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jul 22, 2018 at 5:41 PM, Ian Lepore <ian@freebsd.org> 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 <path> 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 <path> pw(8) was
>   always opening <path>/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 <path>/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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2iaQeeTrBi%2B_muJPjoMQ2d9aYXLpxmm7cyhwne1ELwkrg>