From: "H. Peter Anvin" <hpa@zytor.com>
To: Oleg Verych <olecom@flower.upol.cz>
Cc: "H. Peter Anvin (dash list)" <dash@vger.kernel.org>
Subject: Re: euidaccess() vs non suid /bin/sh (Re: dash test -w oddities)
Date: Wed, 30 Apr 2008 23:03:58 -0700 [thread overview]
Message-ID: <48195D4E.4020504@zytor.com> (raw)
In-Reply-To: <20080501001923.GS24008@flower.upol.cz>
Oleg Verych wrote:
>
> Scripts with '#!/bin/sh' cannot be set-uid,
>
> #man system (debian):
>
> Do not use system() from a program with set-user-ID or set-group-ID
> privileges, because strange values for some environment variables might
> be used to subvert system integrity. Use the exec(3) family of func-
> tions instead, but not execlp(3) or execvp(3). system() will not, in
> fact, work properly from programs with set-user-ID or set-group-ID
> privileges on systems on which /bin/sh is bash version 2, since bash 2
> drops privileges on startup. (Debian uses a modified bash which does
> not do this when invoked as sh.)
This is largely considered a bug in bash, at least when invoked as /bin/sh.
-hpa
next prev parent reply other threads:[~2008-05-01 6:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-30 21:05 dash test -w oddities Remi Broemeling
2008-04-30 22:38 ` Oleg Verych
2008-04-30 23:01 ` euidaccess() vs non suid /bin/sh (Re: dash test -w oddities) Oleg Verych
2008-04-30 22:52 ` H. Peter Anvin
2008-05-01 0:19 ` Oleg Verych
2008-05-01 6:03 ` H. Peter Anvin [this message]
2008-05-02 16:48 ` Oleg Verych
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48195D4E.4020504@zytor.com \
--to=hpa@zytor.com \
--cc=dash@vger.kernel.org \
--cc=olecom@flower.upol.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.