[Pkg-shadow-devel] Bug#483645: Bug#483645: Bug with UID=4294967296 onAlpha-Arch. (lenny/sid)

Morais Oliver oliver.morais at akhwien.at
Fri May 30 10:10:22 UTC 2008


> The bad news is that I can't reproduce this on i386. Thus I will have
to
> ask you questions.

Neither can I :-)

> If you create a file when logged in as user test (with su), does the
file
> belongs to root or to test?

root at testbox:~# touch testfile
root at testbox:~# ls -halt testfile
-rw-r--r-- 1 root test 0 2008-05-30 11:34 testfile

> In fact, I wonder if it is not a bug in id, which cast all the UIDs
and
> GIDs to (unsigned long int).
> Also, are you able to compile some source on that box.
> I would be interested by having the output of:
>
> #include <sys/types.h>
> #include <pwd.h>
> #include <stdio.h>
>
> void main (void)
> {
> 	struct passwd *pwd = getpwnam ("test");
> 	printf ("test's UID: %llu\n", pwd->pw_uid);
> }

>It does not need to be run or compiled as user test, but the user test
> should be present in /etc/passwd.

root at testbox:~# gcc --version
gcc (GCC) 4.2.4 (Debian 4.2.4-1)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

root at testbox:~# gcc test.c
test.c: In function 'main':
test.c:6: warning: return type of 'main' is not 'int'
root at testbox:~# ./a.out
test's UID: 0

> Last but not least, I do not recommend using these UIDs since it will
> trigger bugs (in shadow or other softwares).
> UID below 2^32 should be safe on all architectures.
> (This is not a reason for not fixing these bugs, but it is a good
reason
> for administrators not to use these UIDs)

I know :-) I just "played around" when I found this bug, under normal
circumstances I'd never use such UIDS.

Kind regards,
Oliver





More information about the Pkg-shadow-devel mailing list