projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97bd6b0
)
fix fchown fallback on arches without chown(2)
author
Samuel Holland
<samuel@sholland.org>
Sat, 27 May 2017 20:20:01 +0000
(15:20 -0500)
committer
Rich Felker
<dalias@aerifal.cx>
Sun, 28 May 2017 02:04:12 +0000
(22:04 -0400)
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
patch
|
blob
|
history
diff --git
a/src/unistd/fchown.c
b/src/unistd/fchown.c
index 03459849e50a3436d5bec51a4763375e05c4796d..75075eecea58b057a7619db66355636b2c21fefe 100644
(file)
--- 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
}