]> git.ipfire.org Git - thirdparty/systemd.git/commit
fs-util: no need for fchmod_and_chown() to access /proc/self/fd directly
authorFranck Bui <fbui@suse.com>
Thu, 6 Jun 2019 12:05:27 +0000 (14:05 +0200)
committerFranck Bui <fbui@suse.com>
Tue, 18 Jun 2019 05:54:51 +0000 (07:54 +0200)
commit71ec74d19332378dca8a6a7eb30411e08978f9a6
tree8874714577f26301b4b2cfa99ae8f5cb7a27ba54
parentb337d89c6817ef56d305119a288da8c8839cbf13
fs-util: no need for fchmod_and_chown() to access /proc/self/fd directly

fstat(2) is fine with O_PATH fds.

For changing owership of a file opened with O_PATH, there's fchownat(2).

Only changing permissions is problematic but we introduced fchmod_opath() for
that purpose.
src/basic/fs-util.c