On Mon, Dec 21, 2015 at 08:16:28PM +0100, FRIGN wrote:
> On Mon, 21 Dec 2015 19:05:17 +0000
> Dimitris Papastamos <s...@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.

Reply via email to