svn commit: r277764 - in head/usr.sbin/pw: . tests

Bruce Evans brde at optusnet.com.au
Wed Jan 28 10:40:16 UTC 2015


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


More information about the svn-src-all mailing list