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

2015-01-28 Thread Bryan Drewery
On 1/27/2015 5:44 PM, Baptiste Daroussin wrote: > pw groupdel -u plop removing wheel... or pw userdel -u something > trying to delete root. I just realized this has bitten me many times. I added a ton of voodoo in my scripts to avoid removing root/wheel. This is surely it though. -- Regards, Br

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

2015-01-28 Thread Bruce Evans
On Tue, 27 Jan 2015, Robert Watson wrote: On Sun, 25 Jan 2015, Bruce Evans wrote: Negative ids have historical abuses in places like mountd. mountd still hard-codes -2 and -2 for the default uid and gid of an unprivileged user. ... I'm sure it goes without saying, but for those that don't

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

2015-01-27 Thread Baptiste Daroussin
On Tue, Jan 27, 2015 at 04:08:28PM -0800, Devin Teske wrote: > > > On Jan 27, 2015, at 3:44 PM, Baptiste Daroussin wrote: > > > > On Mon, Jan 26, 2015 at 01:20:28PM -0800, Devin Teske wrote: > >> > >>> On Jan 25, 2015, at 7:31 AM, Bruce Evans wrote: > >>> > >>> On Sun, 25 Jan 2015, Slawa Olho

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

2015-01-27 Thread Devin Teske
> On Jan 27, 2015, at 3:44 PM, Baptiste Daroussin wrote: > > On Mon, Jan 26, 2015 at 01:20:28PM -0800, Devin Teske wrote: >> >>> On Jan 25, 2015, at 7:31 AM, Bruce Evans wrote: >>> >>> On Sun, 25 Jan 2015, Slawa Olhovchenkov wrote: >>> On Sun, Jan 25, 2015 at 04:56:24PM +1100, Bruce Eva

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

2015-01-27 Thread Baptiste Daroussin
On Mon, Jan 26, 2015 at 01:20:28PM -0800, Devin Teske wrote: > > > On Jan 25, 2015, at 7:31 AM, Bruce Evans wrote: > > > > On Sun, 25 Jan 2015, Slawa Olhovchenkov wrote: > > > >> On Sun, Jan 25, 2015 at 04:56:24PM +1100, Bruce Evans wrote: > >> > >>> Negative ids have historical abuses in plac

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

2015-01-27 Thread Robert Watson
On Sun, 25 Jan 2015, Bruce Evans wrote: Negative ids have historical abuses in places like mountd. mountd still hard-codes -2 and -2 for the default uid and gid of an unprivileged user. It at least casts these values to uid_t and gid_t before using them. This gives the ids the non-random valu

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

2015-01-26 Thread Devin Teske
> On Jan 25, 2015, at 7:31 AM, Bruce Evans wrote: > > On Sun, 25 Jan 2015, Slawa Olhovchenkov wrote: > >> On Sun, Jan 25, 2015 at 04:56:24PM +1100, Bruce Evans wrote: >> >>> Negative ids have historical abuses in places like mountd. Which paves the way for the “accepted practice” argument and

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

2015-01-25 Thread Slawa Olhovchenkov
On Mon, Jan 26, 2015 at 07:50:59AM +1100, Peter Jeremy wrote: > On 2015-Jan-25 22:29:26 +0300, Slawa Olhovchenkov wrote: > >I think this is result of convert (signed short) to (signed int). > > > >> >ls -l /usr/ports/packages32/lang > >> >total 2 > >> >lrwxr-xr-x 1 4294967294 wheel 33 Mar 17

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

2015-01-25 Thread Peter Jeremy
On 2015-Jan-25 22:29:26 +0300, Slawa Olhovchenkov wrote: >I think this is result of convert (signed short) to (signed int). > >> >ls -l /usr/ports/packages32/lang >> >total 2 >> >lrwxr-xr-x 1 4294967294 wheel 33 Mar 17 2012 perl-threaded-5.12.4_4.tbz >> >-> ../All/perl-threaded-5.12.4_4.tbz >

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

2015-01-25 Thread Slawa Olhovchenkov
On Mon, Jan 26, 2015 at 06:21:28AM +1100, Peter Jeremy wrote: > On 2015-Jan-25 18:36:40 +0300, Slawa Olhovchenkov wrote: > >On Mon, Jan 26, 2015 at 02:31:05AM +1100, Bruce Evans wrote: > > > >> On Sun, 25 Jan 2015, Slawa Olhovchenkov wrote: > >> > This is not full true for ZFS case. > >> > On ZFS

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

2015-01-25 Thread Peter Jeremy
On 2015-Jan-25 18:36:40 +0300, Slawa Olhovchenkov wrote: >On Mon, Jan 26, 2015 at 02:31:05AM +1100, Bruce Evans wrote: > >> On Sun, 25 Jan 2015, Slawa Olhovchenkov wrote: >> > This is not full true for ZFS case. >> > On ZFS nobody is 2^32-2. Can you please provide a reference to this in the code.

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

2015-01-25 Thread Slawa Olhovchenkov
On Mon, Jan 26, 2015 at 02:31:05AM +1100, Bruce Evans wrote: > On Sun, 25 Jan 2015, Slawa Olhovchenkov wrote: > > > On Sun, Jan 25, 2015 at 04:56:24PM +1100, Bruce Evans wrote: > > > >> Negative ids have historical abuses in places like mountd. mountd still > >> hard-codes -2 and -2 for the defa

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

2015-01-25 Thread Bruce Evans
On Sun, 25 Jan 2015, Slawa Olhovchenkov wrote: On Sun, Jan 25, 2015 at 04:56:24PM +1100, Bruce Evans wrote: Negative ids have historical abuses in places like mountd. mountd still hard-codes -2 and -2 for the default uid and gid of an unprivileged user. It at least casts these values to uid_t

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

2015-01-25 Thread Slawa Olhovchenkov
On Sun, Jan 25, 2015 at 04:56:24PM +1100, Bruce Evans wrote: > Negative ids have historical abuses in places like mountd. mountd still > hard-codes -2 and -2 for the default uid and gid of an unprivileged user. > It at least casts these values to uid_t and gid_t before using them. > This gives th

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

2015-01-25 Thread Baptiste Daroussin
On Sun, Jan 25, 2015 at 04:56:24PM +1100, Bruce Evans wrote: > On Sat, 24 Jan 2015, Baptiste Daroussin wrote: > > > Log: > > Allow negative numbers in -u and -g options > > This is backwards. ids and gids are non-negative integers that can be > represented in the type uid_t and gid_t, respectiv

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

2015-01-24 Thread Bruce Evans
On Sat, 24 Jan 2015, Baptiste Daroussin wrote: Log: Allow negative numbers in -u and -g options This is backwards. ids and gids are non-negative integers that can be represented in the type uid_t and gid_t, respectively. All versions of POSIX require this. Old versions of POSIX allowed uid

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

2015-01-24 Thread Baptiste Daroussin
Author: bapt Date: Sat Jan 24 19:13:03 2015 New Revision: 277652 URL: https://svnweb.freebsd.org/changeset/base/277652 Log: Allow negative numbers in -u and -g options PR: 196514 MFC after:1 week Added: head/usr.sbin/pw/tests/pw_groupshow.sh (contents, props changed)