From: Laurent Bercot <ska-dietlibc@skarnet.org>
To: musl@lists.openwall.com
Subject: Re: musl 1.0.x branch
Date: Tue, 10 Jun 2014 17:50:51 +0100 [thread overview]
Message-ID: <5397376B.3000300@skarnet.org> (raw)
In-Reply-To: <20140610160356.GL179@brightrain.aerifal.cx>
On 10/06/2014 17:03, Rich Felker wrote:
> FYI you can emulate the usefulness of suid, without the danger, by
> having a daemon on a unix socket that you connect to which provides
> the functionality. This is a vastly superior design because there is
> exactly one input channel to the code running with elevated privileges
> (the socket) as opposed to unboundedly many (environment, open fds,
> resource limits, working directory, priority, signal mask and
> dispositions, cpu affinity, ... and whatever else the kernel folks add
> in the future).
And now there are even programs designed to help you do exactly that:
http://skarnet.org/software/s6-networking/s6-sudo.html
(Shameless plug of the day: achieved)
However, despite being a good solution for noninteractive programs, the
unix socket mechanism isn't perfect. There are a lot of things it cannot
transmit without significant trouble - in particular terminals and
everything job-control-related, and signals, etc. I've done quite a bit
of thinking while writing s6-sudo, and my conclusion was that it's a
daunting task to get everything working properly with programs that
need a terminal; it would require ugly wrappers à la ptyget, and more.
I'm not convinced it's even worth trying, as opposed to tackling the
existing terminal-using privilege-granting programs and kicking the
suid out of them.
--
Laurent
next prev parent reply other threads:[~2014-06-10 16:50 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-06 17:56 Rich Felker
2014-06-06 19:39 ` u-igbb
2014-06-07 6:23 ` Kevin Bortis
2014-06-07 13:16 ` Anthony G. Basile
2014-06-07 18:26 ` Gustavo Zacarias
2014-06-09 9:23 ` Natanael Copa
2014-06-09 20:08 ` Rich Felker
2014-06-10 9:43 ` u-igbb
2014-06-10 16:03 ` Rich Felker
2014-06-10 16:50 ` Laurent Bercot [this message]
2014-06-10 17:37 ` Rich Felker
2014-06-10 19:19 ` Laurent Bercot
2014-06-10 21:01 ` Rich Felker
2014-06-11 1:27 ` Laurent Bercot
2014-06-10 20:32 ` u-igbb
2014-06-10 21:51 ` Rich Felker
2014-06-11 10:24 ` u-igbb
2014-06-11 13:09 ` Rich Felker
2014-06-11 14:37 ` u-igbb
2014-06-10 21:25 ` Natanael Copa
2014-06-10 21:13 ` musl 1.0.x branch -- OT u-igbb
2014-06-10 21:55 ` musl 1.0.x branch Rich Felker
2014-06-11 10:41 ` Oliver Schneider
2014-06-11 13:16 ` Rich Felker
2014-06-12 18:46 ` Oliver Schneider
2014-06-13 1:23 ` Rich Felker
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=5397376B.3000300@skarnet.org \
--to=ska-dietlibc@skarnet.org \
--cc=musl@lists.openwall.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).