From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Valdis.Kletnieks@vt.edu
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
mtk.manpages@gmail.com, Stephen Smalley <sds@epoch.ncsc.mil>,
Andrew Morgan <morgan@kernel.org>,
linux-security-module@vger.kernel.org,
lkml <linux-kernel@vger.kernel.org>,
linux-nfs@vger.kernel.org, Igor Zhbanov <izh1979@gmail.com>,
"J. Bruce Fields" <bfields@citi.umich.edu>,
stable@kernel.org, linux-api@vger.kernel.org,
Chris Wright <chrisw@sous-sol.org>
Subject: Re: [PATCH] add some long-missing capabilities to fs_mask
Date: Mon, 13 Apr 2009 16:50:03 -0500 [thread overview]
Message-ID: <20090413215003.GB25085@us.ibm.com> (raw)
In-Reply-To: <13502.1239656608@turing-police.cc.vt.edu>
Quoting Valdis.Kletnieks@vt.edu (Valdis.Kletnieks@vt.edu):
> On Mon, 13 Apr 2009 09:56:14 CDT, "Serge E. Hallyn" said:
> > When POSIX capabilities were introduced during the 2.1 Linux
> > cycle, the fs mask, which represents the capabilities which having
> > fsuid==0 is supposed to grant, did not include CAP_MKNOD and
> > CAP_LINUX_IMMUTABLE. However, before capabilities the privilege
> > to call these did in fact depend upon fsuid==0.
>
> Wow. How did this manage to stay un-noticed for this long?
I guess setfsuid() is mainly used by NFS, and not a lot of people
do mknod over NFS?
To run into this, you'd have to do something like
1. run as root
2. setresuid(500,500,0);
3. (...)
4. setfsuid(0);
5. mknod(path, mode, dev);
so I suspect the simpler (cross-platform) thing to do was
seteuid(0) for the mknod anyway... Plus there is nowhere I've
found where the precise capabilities afforded to fsuid=0 are
documented, so noone would complain, they'd just accept it and
do seteuid()?
I'm guessing of course.
-serge
next prev parent reply other threads:[~2009-04-13 21:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-13 14:56 [PATCH] add some long-missing capabilities to fs_mask Serge E. Hallyn
2009-04-13 21:03 ` Valdis.Kletnieks
[not found] ` <13502.1239656608-+bZmOdGhbsPr6rcHtW+onFJE71vCis6O@public.gmane.org>
2009-04-13 21:33 ` Linus Torvalds
2009-04-13 21:50 ` Serge E. Hallyn [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-03-23 22:46 Serge E. Hallyn
2009-03-20 18:37 Serge E. Hallyn
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=20090413215003.GB25085@us.ibm.com \
--to=serue@us.ibm.com \
--cc=Valdis.Kletnieks@vt.edu \
--cc=bfields@citi.umich.edu \
--cc=chrisw@sous-sol.org \
--cc=izh1979@gmail.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=morgan@kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=sds@epoch.ncsc.mil \
--cc=stable@kernel.org \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).