mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Andreas Gruenbacher <agruen@suse.de>
Cc: morgan@transmeta.com, linux-kernel@vger.kernel.org,
	torvalds@transmeta.com
Subject: Re: permission() bug?
Date: Sun, 1 Feb 2004 13:14:57 -0800	[thread overview]
Message-ID: <20040201131457.2cf44e4c.akpm@osdl.org> (raw)
In-Reply-To: <1075638996.2424.13.camel@nb.suse.de>

Andreas Gruenbacher <agruen@suse.de> wrote:
>
>  the fix for permission() that makes it compliant with POSIX.1-2001
>  apparently was lost. Here is the patch I sent before. (The relevant
>  lines from the standard text are cited in
>  http://www.ussg.iu.edu/hypermail/linux/kernel/0310.2/0286.html. The fix
>  proposed in that posting did not handle directories without execute
>  permissions correctly.)

Question is: should we fix it?  I'm not aware of any bug reports against
this behaviour, and there is the possibility that changing it now will
break some applications.

Yes, those applications are presumably broken on other OS's but that's
different.

Given that this has been a longstanding misbehaviour in Linux (yes?) maybe
the most prudent path is to remain bug-compatible?

I'll add the patch to -mm so we can pick up any obvious userspace breakage,
but it is likely that such problems will take a long time to emerge.

> The access(2) function does not conform to POSIX.1-2001: For root
> and a file with no permissions, access(file, MAY_READ|MAY_EXEC)
> returns 0 (it should return -1).

So are you saying that in this case access() is, in effect, returning

	access(file, MAY_READ) || access(file, MAY_EXEC)

whereas it should be returning

	access(file, MAY_READ) && access(file, MAY_EXEC)

?

  reply	other threads:[~2004-02-01 21:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-01 12:36 Andreas Gruenbacher
2004-02-01 21:14 ` Andrew Morton [this message]
2004-02-01 23:24   ` Andries Brouwer
2004-02-02  3:52   ` Andreas Gruenbacher
  -- strict thread matches above, loose matches on Subject: below --
2003-10-16 15:05 Andreas Gruenbacher
2003-10-17 11:02 ` Michael Kerrisk

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=20040201131457.2cf44e4c.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=agruen@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=morgan@transmeta.com \
    --cc=torvalds@transmeta.com \
    /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®