From: Pavel Machek <pavel@ucw.cz>
To: Alexander Nyberg <alexn@dsv.su.se>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: Capabilities across execve
Date: Sun, 13 Mar 2005 19:32:57 +0100 [thread overview]
Message-ID: <20050313183257.GB1427@elf.ucw.cz> (raw)
In-Reply-To: <1110627748.2376.6.camel@boxen>
Hi!
> This makes it possible for a root-task to pass capabilities to
> nonroot-task across execve. The root-task needs to change it's
> cap_inheritable mask and set prctl(PR_SET_KEEPCAPS, 1) to pass on
> capabilities.
> At execve time the capabilities will be passed on to the new
> nonroot-task and any non-inheritable effective and permitted
> capabilities will be masked out.
> The effective capability of the new nonroot-task will be set to the
> maximum permitted.
>
> >From here on the inheritable mask will be passed on unchanged to the new
> tasks children unless told otherwise (effectively the complete
> capability state is passed on).
>
> With a small insert of prctl(PR_SET_KEEPCAPS, 1) into pam_cap.c at the
> correct place this makes pam_cap work as expected. I'm also attaching a
> test-case that tests capabilities across setuid => execve (makes the new
> task inherit CAP_CHOWN).
FWIV, I think this is good idea; this way capabilities will not only
be castle in the sky, but also will be actually usable.
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
next prev parent reply other threads:[~2005-03-13 18:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-12 11:42 Alexander Nyberg
2005-03-13 3:21 ` Chris Wright
2005-03-15 14:46 ` Alexander Nyberg
2005-03-15 21:57 ` Russell King
2005-03-15 22:42 ` Chris Wright
2005-03-15 23:41 ` Alexander Nyberg
2005-03-15 23:58 ` Chris Wright
2005-03-16 0:34 ` Alexander Nyberg
2005-03-19 0:02 ` Olaf Dietsche
2005-03-13 18:32 ` Pavel Machek [this message]
2005-03-16 0:04 Albert Cahalan
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=20050313183257.GB1427@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=akpm@osdl.org \
--cc=alexn@dsv.su.se \
--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
all inboxes | Powered by JetHome®