All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vasiliy Kulikov <segooon@gmail.com>
To: Ted Ts'o <tytso@mit.edu>, Al Viro <viro@ZenIV.linux.org.uk>,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: check capabilities in open()
Date: Mon, 26 Jul 2010 16:52:35 +0000	[thread overview]
Message-ID: <20100726165235.GA3485@albatros> (raw)
In-Reply-To: <20100726112317.GB9185@thunk.org>

On Mon, Jul 26, 2010 at 07:23 -0400, Ted Ts'o wrote:
> The reason why the apm device needed to sample the suser() bit is that
> it can be opened by root and non-root processes, but it wanted to
> extend the Unix/Linux paradigm that privileges are tested at open()
> time.
Yes, it's exactly that I mean, check at open() time and grand high or
less priviledges.

> 
> So this is a not a bug, but quite deliberately, by design.
If it is explicitly designed to check UID at open() time and to have 2
kinds of file descriptors - priviledged and nonpriviledged, I'm fine
with this.

I wanted kernel community to draw attention because this moment was
not obviously for me and I thought it was a design flaw. Now I'm pleased
with your explanation, thank you.

WARNING: multiple messages have this Message-ID (diff)
From: Vasiliy Kulikov <segooon@gmail.com>
To: "Ted Ts'o" <tytso@mit.edu>, Al Viro <viro@ZenIV.linux.org.uk>,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: check capabilities in open()
Date: Mon, 26 Jul 2010 20:52:35 +0400	[thread overview]
Message-ID: <20100726165235.GA3485@albatros> (raw)
In-Reply-To: <20100726112317.GB9185@thunk.org>

On Mon, Jul 26, 2010 at 07:23 -0400, Ted Ts'o wrote:
> The reason why the apm device needed to sample the suser() bit is that
> it can be opened by root and non-root processes, but it wanted to
> extend the Unix/Linux paradigm that privileges are tested at open()
> time.
Yes, it's exactly that I mean, check at open() time and grand high or
less priviledges.

> 
> So this is a not a bug, but quite deliberately, by design.
If it is explicitly designed to check UID at open() time and to have 2
kinds of file descriptors - priviledged and nonpriviledged, I'm fine
with this.

I wanted kernel community to draw attention because this moment was
not obviously for me and I thought it was a design flaw. Now I'm pleased
with your explanation, thank you.

  reply	other threads:[~2010-07-26 16:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-24 16:07 check capabilities in open() Vasiliy Kulikov
2010-07-24 16:07 ` Vasiliy Kulikov
2010-07-24 18:23 ` Al Viro
2010-07-24 18:23   ` Al Viro
2010-07-25  5:45   ` Vasiliy Kulikov
2010-07-25  5:45     ` Vasiliy Kulikov
2010-07-25  9:23     ` Vasiliy Kulikov
2010-07-25  9:23       ` Vasiliy Kulikov
2010-07-26 11:23     ` Ted Ts'o
2010-07-26 11:23       ` Ted Ts'o
2010-07-26 16:52       ` Vasiliy Kulikov [this message]
2010-07-26 16:52         ` Vasiliy Kulikov

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=20100726165235.GA3485@albatros \
    --to=segooon@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=viro@ZenIV.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.