Re: documentation bug (uid resetting in posix mode)

2012-10-30 Thread Bob Proulx
Andreas Schwab wrote: > Stefano Lattarini writes: > > If it ain't broken, don't fix it ;-) > > As you found out, it _is_ broken. Okay. But broken which way? Which of these are you saying: 1. Broken because bash normally drops privileges? Or: 2. Broken because called as /bin/sh Debian patched

Re: documentation bug (uid resetting in posix mode)

2012-10-30 Thread Bob Proulx
Stefano Lattarini wrote: > Hi Bob, thanks for the tips. However ... > > Bob Proulx wrote: > > Stefano Lattarini wrote: > >> Anyway, my /bin/sh is bash ... > >> $ ls -l /bin/sh > >> lrwxrwxrwx 1 root root 4 Jul 8 2010 /bin/sh -> bash > >> I'm on Debian Unstable BTW (sorry for not specifying

Re: documentation bug (uid resetting in posix mode)

2012-10-30 Thread Andreas Schwab
Stefano Lattarini writes: > If it ain't broken, don't fix it ;-) As you found out, it _is_ broken. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."

Re: documentation bug (uid resetting in posix mode)

2012-10-30 Thread Stefano Lattarini
Hi Bob, thanks for the tips. However ... On 10/30/2012 07:37 PM, Bob Proulx wrote: > Stefano Lattarini wrote: >> Anyway, my /bin/sh is bash ... >> $ ls -l /bin/sh >> lrwxrwxrwx 1 root root 4 Jul 8 2010 /bin/sh -> bash >> I'm on Debian Unstable BTW (sorry for not specifying that earlier). >

Re: documentation bug (uid resetting in posix mode)

2012-10-30 Thread Stefano Lattarini
Hi Chet. On 10/30/2012 07:10 PM, Chet Ramey wrote: > On 10/30/12 1:53 PM, Stefano Lattarini wrote: >> On 10/30/2012 06:28 PM, Andreas Schwab wrote: >>> Stefano Lattarini writes: >>> $ ./system-suid [8204] ruid = 1000, euid = 0, suid = 0 >>> >>> Looks like your /bin/sh is broken. >>>

Re: documentation bug (uid resetting in posix mode)

2012-10-30 Thread Chet Ramey
> Stefano Lattarini wrote: > > Anyway, my /bin/sh is bash ... > > $ ls -l /bin/sh > > lrwxrwxrwx 1 root root 4 Jul 8 2010 /bin/sh -> bash > > I'm on Debian Unstable BTW (sorry for not specifying that earlier). > > Let me say this aside on the issue since there is opportunity for some > confu

Re: documentation bug (uid resetting in posix mode)

2012-10-30 Thread Bob Proulx
Stefano Lattarini wrote: > Anyway, my /bin/sh is bash ... > $ ls -l /bin/sh > lrwxrwxrwx 1 root root 4 Jul 8 2010 /bin/sh -> bash > I'm on Debian Unstable BTW (sorry for not specifying that earlier). Let me say this aside on the issue since there is opportunity for some confusion. On Debian

Re: documentation bug (uid resetting in posix mode)

2012-10-30 Thread Chet Ramey
On 10/30/12 1:53 PM, Stefano Lattarini wrote: > On 10/30/2012 06:28 PM, Andreas Schwab wrote: >> Stefano Lattarini writes: >> >>> $ ./system-suid >>> [8204] ruid = 1000, euid = 0, suid = 0 >> >> Looks like your /bin/sh is broken. >> > How "broken" exactly? Honest question. It's not unheard o

Re: documentation bug (uid resetting in posix mode)

2012-10-30 Thread Stefano Lattarini
On 10/30/2012 06:28 PM, Andreas Schwab wrote: > Stefano Lattarini writes: > >> $ ./system-suid >> [8204] ruid = 1000, euid = 0, suid = 0 > > Looks like your /bin/sh is broken. > How "broken" exactly? Honest question. Anyway, my /bin/sh is bash ... $ ls -l /bin/sh lrwxrwxrwx 1 root ro

Re: documentation bug (uid resetting in posix mode)

2012-10-30 Thread Andreas Schwab
Stefano Lattarini writes: > $ ./system-suid > [8204] ruid = 1000, euid = 0, suid = 0 Looks like your /bin/sh is broken. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."

Re: documentation bug (uid resetting in posix mode)

2012-10-30 Thread Stefano Lattarini
On 10/30/2012 05:06 PM, Andreas Schwab wrote: > Stefano Lattarini writes: > >> From experimenting, I've found out that bash (4.2.20), when invoked >> as "sh", doesn't reset the effective user id to the real user id, >> even if called *without* the '-p' option. > > How did you test that? > Here w

Re: documentation bug (uid resetting in posix mode)

2012-10-30 Thread Andreas Schwab
Stefano Lattarini writes: >>From experimenting, I've found out that bash (4.2.20), when invoked > as "sh", doesn't reset the effective user id to the real user id, > even if called *without* the '-p' option. How did you test that? # ls -l sh -rwsr-xr-x 1 nobody root 755512 30. Okt 17:03 sh # ./

documentation bug (uid resetting in posix mode)

2012-10-30 Thread Stefano Lattarini
>From experimenting, I've found out that bash (4.2.20), when invoked as "sh", doesn't reset the effective user id to the real user id, even if called *without* the '-p' option. This behaviour seems consistent with that of other POSIX shells like dash (0.5.7) and ksh (JM 93u+ 2012-02-29), so I beli