diff options
Diffstat (limited to 'meta/recipes-core/glibc/glibc/0008-nativesdk-glibc-Fall-back-to-faccessat-on-faccess2-r.patch')
-rw-r--r-- | meta/recipes-core/glibc/glibc/0008-nativesdk-glibc-Fall-back-to-faccessat-on-faccess2-r.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/0008-nativesdk-glibc-Fall-back-to-faccessat-on-faccess2-r.patch b/meta/recipes-core/glibc/glibc/0008-nativesdk-glibc-Fall-back-to-faccessat-on-faccess2-r.patch new file mode 100644 index 0000000000..096764009a --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0008-nativesdk-glibc-Fall-back-to-faccessat-on-faccess2-r.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 70da806febac8b2eead6ddc32451bbc1787a1d7d Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 6 Mar 2021 14:48:56 -0800 | ||
4 | Subject: [PATCH] nativesdk-glibc: Fall back to faccessat on faccess2 returns | ||
5 | EPERM | ||
6 | |||
7 | Fedora-specific workaround for systemd-nspawn | ||
8 | |||
9 | Upstream-Status: Inappropriate [Distro Specific] | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | sysdeps/unix/sysv/linux/faccessat.c | 6 +++++- | ||
14 | 1 file changed, 5 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/sysdeps/unix/sysv/linux/faccessat.c b/sysdeps/unix/sysv/linux/faccessat.c | ||
17 | index 2fa57fd63d..4d0d5ff0c4 100644 | ||
18 | --- a/sysdeps/unix/sysv/linux/faccessat.c | ||
19 | +++ b/sysdeps/unix/sysv/linux/faccessat.c | ||
20 | @@ -30,7 +30,11 @@ __faccessat (int fd, const char *file, int mode, int flag) | ||
21 | #if __ASSUME_FACCESSAT2 | ||
22 | return ret; | ||
23 | #else | ||
24 | - if (ret == 0 || errno != ENOSYS) | ||
25 | + /* Fedora-specific workaround: | ||
26 | + As a workround for a broken systemd-nspawn that returns | ||
27 | + EPERM when a syscall is not allowed instead of ENOSYS | ||
28 | + we must check for EPERM here and fall back to faccessat. */ | ||
29 | + if (ret == 0 || !(errno == ENOSYS || errno == EPERM)) | ||
30 | return ret; | ||
31 | |||
32 | if (flag & ~(AT_SYMLINK_NOFOLLOW | AT_EACCESS)) | ||