yeah, same problem in case home directories. why didn't we catch this in pre-release :(
On Wednesday 15 April 2009 01:22:30 pm Sven Joachim wrote: > On 2009-04-15 08:31 +0200, Sven Joachim wrote: > > On 2009-04-15 06:26 +0200, Chip Salzenberg wrote: > >> Package: login > >> Version: 1:4.1.3-1 > >> Severity: grave > >> > >> When logging in on the console, the permission on e.g. /dev/tty1 are > >> Weirdly Wrong: > >> > >> # ls -l /dev/tty1 > >> c--x-wx--T 1 root 4, 1 Apr 14 21:24 /dev/tty1 > >> > >> "That's not right. It's not even wrong." > > > > Same here. Looks like a problem with octal vs decimal numbers, because > > that weird permissions are 1130 numerical, and 01130 = 600 in decimal. > > The problem seems to be in the getlong function in lib/getlong.c, it > uses the wrong base for strtol: > > val = strtol (numstr, &endptr, 10); > > and numstr contains "0600", so the result is 600 aka 01130 instead of > 384 aka 0600. Probably that line just needs to be changed to > > val = strtol (numstr, &endptr, 0); > > to fix the problem. > > Sven > > > > _______________________________________________ > Pkg-shadow-devel mailing list > pkg-shadow-de...@lists.alioth.debian.org > http://lists.alioth.debian.org/mailman/listinfo/pkg-shadow-devel
diff -up shadow-4.1.3/lib/getlong.c.base shadow-4.1.3/lib/getlong.c --- shadow-4.1.3/lib/getlong.c.base 2009-04-11 00:37:28.000000000 +0200 +++ shadow-4.1.3/lib/getlong.c 2009-04-15 13:38:49.000000000 +0200 @@ -41,7 +41,7 @@ int getlong (const char *numstr, long in char *endptr; errno = 0; - val = strtol (numstr, &endptr, 10); + val = strtol (numstr, &endptr, 0); if (('\0' == numstr) || ('\0' != *endptr) || (ERANGE == errno)) { return 0; }