[Pkg-shadow-devel] Bug#524139: Bug#524139: login: tty perms very, weirdly wrong on console

Peter Vrabec pvrabec at redhat.com
Wed Apr 15 11:47:36 UTC 2009


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-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/pkg-shadow-devel


-------------- next part --------------
A non-text attachment was scrubbed...
Name: shadow-4.1.3-base.patch
Type: text/x-diff
Size: 457 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/attachments/20090415/18e132df/attachment-0001.patch>


More information about the Pkg-shadow-devel mailing list