Bug#183694: problem of 32 bit uid or gid in glibc
At Fri, 07 Mar 2003 05:15:53 +0900,
kakuma fumihiko wrote:
> Running samba as file server on i686 under Debian Woody.
> When client access shared file on uid of 65535 by Windows2k
> and open the property of shared file, ACL information can't
> refernce. This means that it happen error in samba.
> Samba works good on uid less than 65535.
Is this happened even if uid is over 65535?
> Show a easy test case.
>
> $ su -
> # cat > idt.c
> #include <stdio.h>
> #include <stdlib.h>
> #include <errno.h>
> #include <unistd.h>
>
> #define UID 65535
>
> main()
> {
> int ret;
> unsigned int euid;
>
> errno=ENOSYS;
> if( seteuid(UID) == -1 )
> exit(-1);
>
> euid = geteuid();
> printf("geteuid() errno=%d uid=%d\n", errno, euid);
> ret = seteuid(UID);
> printf("seteuid() errno=%d ret=%d\n", errno, ret);
>
> }
> # cc -o idt idt.c
> # ./idt
> geteuid() errno=38 uid=65535
> seteuid() errno=22 ret=-1
> #
The first seteuid sets to non-root-priviledged.
Then the second seteuid() should reject to change euid.
Is this example correct?
Regards,
-- gotom
Reply to: