mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Neil Schemenauer <nas@python.ca>
To: linux-kernel@vger.kernel.org
Subject: Re: ANN: capwrap - grant capabilities to executables
Date: Sun, 17 Mar 2002 14:45:32 -0800	[thread overview]
Message-ID: <20020317144532.A18963@glacier.arctrix.com> (raw)
In-Reply-To: <20020317121118.A18548@glacier.arctrix.com> <a73548$4t3$1@cesium.transmeta.com>
In-Reply-To: <a73548$4t3$1@cesium.transmeta.com>; from hpa@zytor.com on Sun, Mar 17, 2002 at 02:25:12PM -0800

H. Peter Anvin wrote:
> Why not just do this with a small program if you're doing setuid
> anyway?

Nothing is running with root privileges (unless root is executing it).
The SUID bit on the wrapper is just a marker and does not change the
effective uid of the process.  Also, AFAIK, you can't pass capabilities
from one program to another using exec().   I don't completely
understand this stuff yet but fs/exec.c has these lines in the
prepare_binprm() function:

        cap_clear(bprm->cap_inheritable);
        cap_clear(bprm->cap_permitted);
        cap_clear(bprm->cap_effective);

Capabilities are only raised if bprm->e_uid == 0.  So, unless I'm
misunderstand the code, you can't do the same thing with a SUID wrapper.

Thanks for you're comments.

  Neil

      reply	other threads:[~2002-03-17 22:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-17 20:11 Neil Schemenauer
2002-03-17 22:25 ` H. Peter Anvin
2002-03-17 22:45   ` Neil Schemenauer [this message]

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=20020317144532.A18963@glacier.arctrix.com \
    --to=nas@python.ca \
    --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®