Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 Sep 2015 19:31:40 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 202892] open with O_CREAT | O_DIRECTORY when path references a symlink
Message-ID:  <bug-202892-8-B8Z8tczii0@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-202892-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-202892-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202892

--- Comment #10 from commit-hook@freebsd.org ---
A commit references this bug:

Author: kib
Date: Wed Sep  9 19:31:09 UTC 2015
New revision: 287599
URL: https://svnweb.freebsd.org/changeset/base/287599

Log:
  For open("name", O_DIRECTORY | O_CREAT), do not try to create the
  named node, open(2) cannot create directories.  But do allow the flag
  combination to succeed if the directory already exists.

  Declare the open("name", O_DIRECTORY | O_CREAT | O_EXCL) always
  invalid for the same reason, since open(2) cannot create directory.

  Note that there is an argument that O_DIRECTORY | O_CREAT should be
  invalid always, regardless of the target directory existence or
  O_EXCL.  The current fix is conservative and allows the call to
  succeed in the situation where it succeeded before the patch.

  Reported by:    Tom Ridge <freebsd@tom-ridge.com>
  Reviewed by:    rwatson
  PR:     202892
  Sponsored by:    The FreeBSD Foundation
  MFC after:    1 week

Changes:
  head/sys/kern/vfs_vnops.c

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-202892-8-B8Z8tczii0>