Browse Source

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).
Samuel Holland 7 years ago
parent
commit
81f4a1200a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/unistd/fchown.c

+ 1 - 1
src/unistd/fchown.c

@@ -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
 
 
 }
 }