From owner-svn-src-head@freebsd.org Mon Jul 23 14:53:47 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 9E2A6104CEF0; Mon, 23 Jul 2018 14:53:47 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0B0A37F913; Mon, 23 Jul 2018 14:53:47 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf1-x143.google.com with SMTP id y200-v6so681269lfd.7; Mon, 23 Jul 2018 07:53:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=n5lW5fzU5uma2Q8ZAlbsndaN0lCHMqQys/Ftpum17mU=; b=MTYD7BThnlNLF9mWs7PE2GxPyGX7j00uRLGatTajpgDhDUhtI5E32dQtZwwspXU78L iTxDHSUYXdRHx5TBPl3tWqf+jFfj6nLkf2fcRPBB/zbZE3BctHo+z6j1gX0W8LO6BadT Ntg19eMI/0+jdIeQCVWWnImOYVw31mbbpzWLwZxT1WCRpkidu03OMqfacn4uO5lwquom b0Hl4IJHwO/PzlWtmGr9wKk2muyAVjjgDZ0LCHdg7PcoFNt+FzfyEWbpCyl33rSIuJG1 usySpOOOsbQSWuXa2VUBVp71Hq2u8LujRAtCWXSQ32iPmi6mtdKKFcR/3TpVteF0ro1f zstA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=n5lW5fzU5uma2Q8ZAlbsndaN0lCHMqQys/Ftpum17mU=; b=GIXgt+ZYbdSzhNkifD5ZOJdRM/ekOPE9DqhP2rT4G+PJ9N72Oml8/fhyLdIDVLp53c WRpHX8dnpuT/UofvYl/DHOY5nS4rLrWzBHYudnDpGzVDvISuAtNLvOGQ91/zDz8Un1oB vE1lhT2KOSBXXR/hPji0hl7B/ql2+896o2zEBdwAoij/tifVAbUn9fvO1VbXWzjarWDL 9VUP/QXxf/cy/+1spHz5o8LM8j38wPylBRYRcoE4cB5/mcdpypMjGlaEjyWFWC48AEqq ViuqK5of52gza50gb0WS7NONzCZhPTik2lS4BflP0Nmbw9xC4foL12Tmp4HUhvjCqRdV 0PmQ== X-Gm-Message-State: AOUpUlFJGLYIfRZgwLDfF8OG66cuLkCQq7KFCVIs8S1FwyJNBKhanDCy X/sXitCZpHej1HTi2QUjJ1Qt7nMamLKlsTCZaY85//6V X-Google-Smtp-Source: AAOMgpfMTBsAOO1aIg/qs2xUrM+NLYbCt6/9AtJPcPAXLQuOG9IUSxIY26mIk2F8U6+Q1AJys1fZdegPjgScHURaz0I= X-Received: by 2002:a19:fc3:: with SMTP id 64-v6mr7897064lfp.46.1532357625355; Mon, 23 Jul 2018 07:53:45 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 2002:ab3:7851:0:0:0:0:0 with HTTP; Mon, 23 Jul 2018 07:53:44 -0700 (PDT) In-Reply-To: <201807222341.w6MNfeDa065288@repo.freebsd.org> References: <201807222341.w6MNfeDa065288@repo.freebsd.org> From: Alan Somers Date: Mon, 23 Jul 2018 08:53:44 -0600 X-Google-Sender-Auth: MSNPGNleRaWuZZcmPyl_Sk4uwb4 Message-ID: Subject: Re: svn commit: r336625 - head/usr.sbin/pw To: Ian Lepore Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 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:53:48 -0000 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