Add Linux-specific setfsuid(2)/setfsgid(2)
I would be helpful if you add a binding to the Linux-specific syscalls
Their purpose is to change the uid/gid with which filesystem access control is performed. Their main usage is simulating fs access on behalf of other users.
Differently from setuid/setreuid/etc... thess calls have thread-local effect, thus they may be useful in solving some problems when needing to temporarily drop privileges in multi-threaded applications.
Updated by normalperson (Eric Wong) about 4 years ago
Given Ruby already supports Kernel#syscall, I wonder if we should
support something a generated syscall.rb file in the stdlib with
all the available syscall numbers exported as constants:
SYS_setfsuid = 138 SYS_setfsgid = 139 ...
This could kill off a lot of C extensions :)
I've been happily using Danga::Socket + Sys::Syscall in Perl the past
few years. Sure there have been occasional problems, but I still prefer
aalways having the source file with me without worrying about
mis-installed objects (a frequent source of bug reports on redmine),
compile times, etc...