diff options
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch')
-rw-r--r-- | meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch index 5f2178734d..cf06572b82 100644 --- a/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch +++ b/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch @@ -31,11 +31,9 @@ Signed-off-by: Andre McCurdy <armccurdy@gmail.com> src/shared/base-filesystem.c | 6 +++--- 2 files changed, 24 insertions(+), 5 deletions(-) -diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h -index 027037f7a7..16eb379caf 100644 --- a/src/basic/fs-util.h +++ b/src/basic/fs-util.h -@@ -44,8 +44,27 @@ int futimens_opath(int fd, const struct timespec ts[2]); +@@ -47,8 +47,27 @@ int futimens_opath(int fd, const struct int fd_warn_permissions(const char *path, int fd); int stat_warn_permissions(const char *path, const struct stat *st); @@ -65,20 +63,18 @@ index 027037f7a7..16eb379caf 100644 int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode); int touch(const char *path); -diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c -index 1d05409086..1ed06c31ab 100644 --- a/src/shared/base-filesystem.c +++ b/src/shared/base-filesystem.c -@@ -54,7 +54,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { +@@ -53,7 +53,7 @@ int base_filesystem_create(const char *r return log_error_errno(errno, "Failed to open root file system: %m"); - for (i = 0; i < ELEMENTSOF(table); i ++) { + for (size_t i = 0; i < ELEMENTSOF(table); i++) { - if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0) + if (faccessat(fd, table[i].dir, F_OK, 0) >= 0) continue; if (table[i].target) { -@@ -62,7 +62,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { +@@ -61,7 +61,7 @@ int base_filesystem_create(const char *r /* check if one of the targets exists */ NULSTR_FOREACH(s, table[i].target) { @@ -87,7 +83,7 @@ index 1d05409086..1ed06c31ab 100644 continue; /* check if a specific file exists at the target path */ -@@ -73,7 +73,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { +@@ -72,7 +72,7 @@ int base_filesystem_create(const char *r if (!p) return log_oom(); |