lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160426175538.GO25498@ZenIV.linux.org.uk>
Date:	Tue, 26 Apr 2016 18:55:38 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [RFC] a corner case of open(2)

	According to POSIX (and behaviour on other Unices) the following
should succeed: open("/tmp", O_CREAT, 0) does not have O_EXCL and the pathname
does refer to existing object, so O_CREAT is ignored and the call is
equivalent to open("/tmp", 0), which succeeds.

	We have it rejected with EISDIR.  The thing is, the standard behaviour
is actually less messy wrt code, and do_last()/lookup_open()/atomic_open()
badly needs untangling.

	Another place where we produce a bogus EISDIR is O_CREAT|O_EXCL on
an existing directory.  POSIX (and other Unices) have EEXIST there.  In some
cases we produce EEXIST, in some - EISDIR.  Uniform EEXIST is actually easier.

	It is a change of user-visible behaviour, but I would be very
surprised if anything broke from that change.  And it would help to simplify
the awful mess we have in there.

	Comments?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ