mirror of
https://github.com/systemd/systemd.git
synced 2024-10-31 07:51:21 +03:00
tmpfiles: fstat() works with fd opened with O_PATH since Linux 3.6
This commit is contained in:
parent
774f79b570
commit
56114d45d0
@ -814,7 +814,7 @@ static int path_set_perms(Item *i, const char *path) {
|
|||||||
return r;
|
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);
|
return log_error_errno(errno, "Failed to fstat() file %s: %m", path);
|
||||||
|
|
||||||
if (hardlink_vulnerable(&st)) {
|
if (hardlink_vulnerable(&st)) {
|
||||||
@ -1003,7 +1003,7 @@ static int path_set_acls(Item *item, const char *path) {
|
|||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return log_error_errno(errno, "Adjusting ACL of %s failed: %m", path);
|
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);
|
return log_error_errno(errno, "Failed to fstat() file %s: %m", path);
|
||||||
|
|
||||||
if (hardlink_vulnerable(&st)) {
|
if (hardlink_vulnerable(&st)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user