Subject: Re: bin/18222: patch to allow a uid or gid of (-2) matching default NFS mapping for remote root users
To: None <netbsd-bugs@netbsd.org, gnats-bugs@gnats.netbsd.org>
From: David Laight <david@l8s.co.uk>
List: netbsd-bugs
Date: 09/07/2002 22:24:38
I've looked at the posix/ieee definitions of uid_t, gid_t and pid_t on
http://www.opengroup.org/onlinepubs/007904975/basedefs/sys/types.h.html
uid_t and gid_t are defined to be unsigned, and pid_t signed.
setreuid() is there, and requires -1 to be valid for an unsigned
parameter. C's 'Integral Convertions' DTRT (by K&R2) [1] but I bet
gcc will give a warning.
NetBSD sys/ansi.h seems to have an unsigned pid_t....
David
[1] by definition (unsigned long long)(signed char)-1 == ~0ull
--
David Laight: david@l8s.co.uk