New setre*id functions broken on alpha
Jakub Jelinek
jakub@redhat.com
Mon Nov 1 07:04:00 GMT 2004
On Sun, Oct 31, 2004 at 12:02:03AM +0200, Mariusz Mazur wrote:
> Stub functions aren't used any more, now C compiler has controll of the what's
> going on. Those functions take gid_t or uid_t as arguments and those types
> are defines as unsigned int (32 bit). Later they are casted to type long to
> put them into appropriate registers before making a syscall. The problem is
> that although those are unsigned ints we're using, the kernel expects to get
> a '-1' value in some cases (ask the designers what where they thinking). Now
> according to "Calling Standard for Alpha Systems"* when passing a 32bit
> signed to a function (that is putting it into a 64bit register) the signed
But uid_t is unsigned int on Alpha:
asm-alpha/posix_types.h:typedef unsigned int __kernel_uid_t;
asm-alpha/posix_types.h:typedef __kernel_uid_t __kernel_uid32_t;
linux/types.h:typedef __kernel_uid32_t uid_t;
asmlinkage long sys_setreuid(uid_t ruid, uid_t euid)
...
if (ruid != (uid_t) -1) {
...
if (euid != (uid_t) -1) {
Jakub
More information about the Libc-alpha
mailing list