From: Pavel Machek <pavel@suse.cz>
To: ebuddington@wesleyan.edu, linux-kernel@vger.kernel.org
Subject: Re: capabilities carried over execve()
Date: Thu, 26 Apr 2001 22:10:49 +0200 [thread overview]
Message-ID: <20010426221049.E803@bug.ucw.cz> (raw)
In-Reply-To: <20010424104518.J18326@sparrow.nad.adelphia.net>
In-Reply-To: <20010424104518.J18326@sparrow.nad.adelphia.net>; from Eric Buddington on Tue, Apr 24, 2001 at 10:45:18AM -0400
Hi!
> I am attempting to write an init replacement that is capability-smart.
> Though I'm pleased that prctl() lets me keep capabilities across a
> setreuid(), maintaining caps over execve() seems impossible to do right.
>
> I currently see a few options:
> - use the CLOEXEC-pipe hack that execcap uses (parent notices
> when pipe closes then rushes to set caps on child before
> child notices they're gone). This looks like a race to me.
> - tweak linux/fs/exec.c (prepare_binprm) to pretend that all
> files have cap_inheritable and cap_effective fully set.
> This seems a more elegant solution, but requires a kernel
> patch.
> - exec the child in a stopped state, mess with caps, then
> send it SIGCONT. AFAIK, there is no way to do
> execve_and_stop.
What about ptrace? It should be able to do this kind of stuff... but
it is going to be messy.
Pavel
--
I'm pavel@ucw.cz. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents at discuss@linmodems.org
next prev parent reply other threads:[~2001-04-27 14:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-24 14:45 capabilities carried over execve() Eric Buddington
2001-04-26 20:10 ` Pavel Machek [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-04-24 15:05 willy tarreau
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=20010426221049.E803@bug.ucw.cz \
--to=pavel@suse.cz \
--cc=ebuddington@wesleyan.edu \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox