Re: [hackers] [sbase] chown: fix user:group option parsing
On Mon, Dec 21, 2015 at 08:16:28PM +0100, FRIGN wrote:
> On Mon, 21 Dec 2015 19:05:17 +0000
> Dimitris Papastamos <sin_AT_2f30.org> wrote:
>
> > uid_t, gid_t are typically unsigned, so the check needs to be
> > == -1 otherwise it will never be true.
>
> We both are wrong :P It can either be signed or unsigned.
The only guarantee is that -1 is an invalid uid/gid. That's true
regardless of whether it is interpreted as signed or unsigned.
The new check works with both signed and unsigned uid/gid. The check
< 0 does not work for unsigned uid/gid.
Received on Mon Dec 21 2015 - 20:22:25 CET
This archive was generated by hypermail 2.3.0
: Mon Dec 21 2015 - 20:24:14 CET