[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#183694: problem of 32 bit uid or gid in glibc



On Fri, 07 Mar 2003 09:40:43 +0900
GOTO Masanori <gotom@debian.or.jp> wrote:

> 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?
> 

Yes it happen when uid is greater than  65534.

> >  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
> 

Sorry, this example maybe isn't better.
I make this program that only heappen error, and so
the work is meaningless itself.
If UID is less than 65535, this program will be successful.

-- 
kakuma fumihiko <kakuma@valinux.co.jp>




Reply to: