mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: linux-kernel@vger.kernel.org
Subject: Re: ANN: capwrap - grant capabilities to executables
Date: 17 Mar 2002 14:25:12 -0800	[thread overview]
Message-ID: <a73548$4t3$1@cesium.transmeta.com> (raw)
In-Reply-To: <20020317121118.A18548@glacier.arctrix.com>

Followup to:  <20020317121118.A18548@glacier.arctrix.com>
By author:    Neil Schemenauer <nas@python.ca>
In newsgroup: linux.dev.kernel
>
> I've written a small module¹ that enables the use of Linux capabilities
> on filesystems that do not support them.  It is similar in spirit to ELF
> capabilities hack² but is not specific to the ELF executable format and
> is implemented as separate kernel module.
> 
> To grant capabilities to an executable, a small wrapper file is created
> that includes the path to an executable followed a capability set
> written in hexadecimal.  When this file is executed by the kernel, the
> executable is granted the specified capabilities.  The wrapper file must
> be owned by root and have the SUID bit set.
> 
> For example, to remove the SUID bit on the ping program while retaining
> its functionality:
> 
>     # chmod -s /bin/ping
>     # mv /bin/ping /bin/ping_real
>     # echo '&/bin/ping_real 2000' > /bin/ping
>     # chmod +xs /bin/ping
> 

Why not just do this with a small program if you're doing setuid
anyway?

	-hpa
-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt	<amsp@zytor.com>

  reply	other threads:[~2002-03-17 22:26 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 [this message]
2002-03-17 22:45   ` Neil Schemenauer

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='a73548$4t3$1@cesium.transmeta.com' \
    --to=hpa@zytor.com \
    --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®