From: chris@scary.beasts.org
To: Joao Santos <jps@corah.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: setuid odd behaviour
Date: Sun, 27 Jun 2004 00:38:31 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.58.0406270032190.24811@sphinx.mythic-beasts.com> (raw)
In-Reply-To: <007b01c45bd2$9c0687f0$020010ac@local>
Hi,
On Sun, 27 Jun 2004, Joao Santos wrote:
> Hello everyone.
>
> I have been rewriting a private privilege system in the 2.6.7 kernel and
> while making the final tests, vsftpd did not work because it could not set
> capabilities after changing to UID 99 (which seemed correct to me). Just to
> make sure I was doing the right thing, I booted up a vanilla kernel and
> traced vsftpd again to see how the kernel was reacting to that setcap()
> after setuid() and strangely the kernel let the setcap through and returned
> success.
Yep - vsftpd uses prctl(PR_SET_KEEPCAPS, 1) to achieve this.
It's necessary because there's little point in reducing your capability
set unless you also switch away from uid 0 (it owns files which could be
used to regain full capabilities).
Cheers
Chris
next prev parent reply other threads:[~2004-06-26 23:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-26 23:09 Joao Santos
2004-06-26 23:38 ` chris [this message]
2004-06-26 23:52 ` Joao Santos
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=Pine.LNX.4.58.0406270032190.24811@sphinx.mythic-beasts.com \
--to=chris@scary.beasts.org \
--cc=jps@corah.org \
--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®