提交 81f4a120 编写于 作者: S Samuel Holland 提交者: Rich Felker

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).
上级 97bd6b09
...@@ -16,7 +16,7 @@ int fchown(int fd, uid_t uid, gid_t gid) ...@@ -16,7 +16,7 @@ int fchown(int fd, uid_t uid, gid_t gid)
#ifdef SYS_chown #ifdef SYS_chown
return syscall(SYS_chown, buf, uid, gid); return syscall(SYS_chown, buf, uid, gid);
#else #else
return syscall(SYS_fchownat, AT_FDCWD, buf, uid, gid); return syscall(SYS_fchownat, AT_FDCWD, buf, uid, gid, 0);
#endif #endif
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册