From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 10:40:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7252BA42; Wed, 28 Jan 2015 10:40:16 +0000 (UTC) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 0AD35E3B; Wed, 28 Jan 2015 10:40:16 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 74523D6717B; Wed, 28 Jan 2015 21:16:58 +1100 (AEDT) Date: Wed, 28 Jan 2015 21:16:57 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Baptiste Daroussin Subject: Re: svn commit: r277764 - in head/usr.sbin/pw: . tests In-Reply-To: <201501261650.t0QGohSI044141@svn.freebsd.org> Message-ID: <20150128210631.Q2199@besplex.bde.org> References: <201501261650.t0QGohSI044141@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=C77Ql2/+ c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=TA7HtaPY_puZ0PvRsjQA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 10:40:16 -0000 On Mon, 26 Jan 2015, Baptiste Daroussin wrote: > Log: > Revert r277652 > > uid and gid are never and should never be negative. The pw(8) manpage clearly > states the -u and -g arguments are for uids/gids, hence using negative values is > abusing a bug in former versions of pw(8) Thanks. Further discussion showed that the historical misbehaviour is more common than I thought, so this doesn't resolve the problem in pw. But it seems reasonable to start disallowing creating negative ids in utilities for creating ids. Ones that used to allow it should at least allow creating all the positive ids that the negative ids were accidentally mapped to (like -2 -> huge value). Bruce