diff options
author | Franck Bui <fbui@suse.com> | 2018-03-02 16:25:56 +0100 |
---|---|---|
committer | Franck Bui <fbui@suse.com> | 2018-03-05 19:00:11 +0100 |
commit | 56114d45d01fe3e4938e31549ad7c0bd19b9cf42 (patch) | |
tree | f2d6049e773e8ff01095f309367e54f70eaab330 /src/tmpfiles | |
parent | 774f79b570ce1976a2c98d7e097df637e484f2e7 (diff) | |
download | systemd-56114d45d01fe3e4938e31549ad7c0bd19b9cf42.tar.gz |
tmpfiles: fstat() works with fd opened with O_PATH since Linux 3.6
Diffstat (limited to 'src/tmpfiles')
-rw-r--r-- | src/tmpfiles/tmpfiles.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 42d85a3928..dba3152671 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -814,7 +814,7 @@ static int path_set_perms(Item *i, const char *path) { return r; } - if (fstatat(fd, "", &st, AT_EMPTY_PATH) < 0) + if (fstat(fd, &st) < 0) return log_error_errno(errno, "Failed to fstat() file %s: %m", path); if (hardlink_vulnerable(&st)) { @@ -1003,7 +1003,7 @@ static int path_set_acls(Item *item, const char *path) { if (fd < 0) return log_error_errno(errno, "Adjusting ACL of %s failed: %m", path); - if (fstatat(fd, "", &st, AT_EMPTY_PATH) < 0) + if (fstat(fd, &st) < 0) return log_error_errno(errno, "Failed to fstat() file %s: %m", path); if (hardlink_vulnerable(&st)) { |