>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
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
# ./
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
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."
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
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
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
> 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
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.
>>>
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).
>
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."
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
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
13 matches
Mail list logo