mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Joao Santos" <jps@corah.org>
To: <chris@scary.beasts.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: setuid odd behaviour
Date: Sun, 27 Jun 2004 00:52:57 +0100	[thread overview]
Message-ID: <00cf01c45bd8$b4a23790$020010ac@local> (raw)
In-Reply-To: <Pine.LNX.4.58.0406270032190.24811@sphinx.mythic-beasts.com>

Thanks Chris, my manpages seem to be a bit outdated.

----- Original Message -----
From: <chris@scary.beasts.org>
To: "Joao Santos" <jps@corah.org>
Cc: <linux-kernel@vger.kernel.org>
Sent: Sunday, June 27, 2004 12:38 AM
Subject: Re: setuid odd behaviour


> 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
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>



      reply	other threads:[~2004-06-26 23:53 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
2004-06-26 23:52   ` Joao Santos [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='00cf01c45bd8$b4a23790$020010ac@local' \
    --to=jps@corah.org \
    --cc=chris@scary.beasts.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®