mikaku / Fiwix

A UNIX-like kernel for the i386 architecture
https://www.fiwix.org
Other
401 stars 32 forks source link

Support syscall chown32 #53

Closed rick-masters closed 7 months ago

rick-masters commented 7 months ago

This syscall is needed for musl support because musl defaults to using this version of this system call rather than SYS_chown. This syscall supports 32-bit user and group ids (versus 16-bit for the SYS_chown syscall).

Test program is attached. Note that this requires super user permissions to change the file ownership.

# cc -m32 testchown32.c -o testchown32
# touch testfile
# ./testchown32
stat64: uid is 80000
stat64: gid is 80001
# rm testfile

testchown32.c.gz

mikaku commented 7 months ago

Thank you very much.