From: "George Spelvin" <linux@horizon.com>
To: luto@amcaptial.net, torvalds@linux-foundation.org
Cc: linux@horizon.com, linux-kernel@vger.kernel.org
Subject: Re: Sharing credentials in general (Re: [GIT PULL] kdbus for 4.1-rc1)
Date: 27 Apr 2015 01:38:23 -0400 [thread overview]
Message-ID: <20150427053823.9847.qmail@ns.horizon.com> (raw)
Linus wrote:
> It would be insane to say that the open system call should have an
> explicit argument saying that the vfs layer should take your privileges
> into account.
On the contrary, it would be a big improvement on the current interface.
To be clearer, it would be great if the open system call took an explicit
argument saying *which* privileges it should take into account.
All that screwing around with uid, euid and fsuid and crap would be
a lot simpler if it was explicit in the open() call which permissions
were desired.
In my "If I had a time machine and could go back and talk to Ken & Dennis"
fantasy, there would be no open(), only openat(), and the permissions
would be associated with the dirfd.
In addition to the now-current standard three fds, there would be
additional ones for root and cwd. And, in a setuid program,
a separate set for effective uids.
So openat(fd, path, flags) would use the real or effective permissions
depending on which fd was in use. A process could drop permissions
by closing the associated fd. Etc.
(And a program which was written without setuid awareness would only
use the real-uid dirfds, and the setuidness would do nothing.)
next reply other threads:[~2015-04-27 5:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-27 5:38 George Spelvin [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-04-23 19:41 Andy Lutomirski
2015-04-23 21:05 ` Linus Torvalds
2015-04-23 22:08 ` Andy Lutomirski
2015-04-27 8:17 ` David Herrmann
2015-04-27 14:57 ` One Thousand Gnomes
2015-04-27 15:50 ` David Herrmann
2015-04-27 16:13 ` Andy Lutomirski
2015-04-27 16:33 ` David Herrmann
2015-05-02 1:48 ` Andy Lutomirski
2015-05-03 19:43 ` Havoc Pennington
2015-04-27 13:01 ` Djalal Harouni
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=20150427053823.9847.qmail@ns.horizon.com \
--to=linux@horizon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amcaptial.net \
--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
all inboxes | Powered by JetHome®