diff options
author | Timo Teräs <timo.teras@iki.fi> | 2017-06-01 13:29:51 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2017-06-01 13:31:29 +0300 |
commit | f6baa2aad98a418cd21b857f825e772a987b7c93 (patch) | |
tree | 510f68566eabbb6c8960020099b454ee5819bd18 /main/musl/0040-fix-fchown-fallback-on-arches-without-chown-2.patch | |
parent | acf34d0e48d8c8999406c748bfcf68c1ba61ddae (diff) | |
download | aports-f6baa2aad98a418cd21b857f825e772a987b7c93.tar.bz2 aports-f6baa2aad98a418cd21b857f825e772a987b7c93.tar.xz |
main/musl: cherry-pick upstream fixes, add strftime gnu extensions
ref #5907
Diffstat (limited to 'main/musl/0040-fix-fchown-fallback-on-arches-without-chown-2.patch')
-rw-r--r-- | main/musl/0040-fix-fchown-fallback-on-arches-without-chown-2.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/main/musl/0040-fix-fchown-fallback-on-arches-without-chown-2.patch b/main/musl/0040-fix-fchown-fallback-on-arches-without-chown-2.patch new file mode 100644 index 0000000000..bfe3a93ed9 --- /dev/null +++ b/main/musl/0040-fix-fchown-fallback-on-arches-without-chown-2.patch @@ -0,0 +1,28 @@ +From 81f4a1200a58a84c83e73da645d4f226a8785bdf Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Sat, 27 May 2017 15:20:01 -0500 +Subject: [PATCH] fix fchown fallback on arches without chown(2) + +The flags argument was missing, causing uninitalized data to be passed +to fchownat(2). The correct value of flags should match the fallback for +chown(3). +--- + src/unistd/fchown.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/unistd/fchown.c b/src/unistd/fchown.c +index 03459849..75075eec 100644 +--- a/src/unistd/fchown.c ++++ b/src/unistd/fchown.c +@@ -16,7 +16,7 @@ int fchown(int fd, uid_t uid, gid_t gid) + #ifdef SYS_chown + return syscall(SYS_chown, buf, uid, gid); + #else +- return syscall(SYS_fchownat, AT_FDCWD, buf, uid, gid); ++ return syscall(SYS_fchownat, AT_FDCWD, buf, uid, gid, 0); + #endif + + } +-- +2.13.0 + |