chiark / gitweb /
tree-wide: no need to pass excess flags to open()/openat() if O_PATH is passed
authorAlexander Kuleshov <kuleshovmail@gmail.com>
Tue, 1 Mar 2016 18:25:09 +0000 (00:25 +0600)
committerSven Eden <yamakuzure@gmx.net>
Fri, 16 Jun 2017 08:12:57 +0000 (10:12 +0200)
commitd22ef91ebee03e0e587723ba428b2c3c92c7488f
tree8247a6ea23493f931141ec9cb20ba3f4872c1356
parente1565899db3b946fa0d51e73cb9bbc3f35e966c5
tree-wide: no need to pass excess flags to open()/openat() if O_PATH is passed

As described in the documentation:

When O_PATH is specified in flags, flag bits other than O_CLOEXEC,
O_DIRECTORY, and O_NOFOLLOW are ignored.

So, we can remove unnecessary flags in a case when O_PATH is passed
to the open() or openat().
src/basic/mount-util.c
src/basic/xattr-util.c