summaryrefslogtreecommitdiff
path: root/src/unistd/setegid.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2013-08-03 03:16:24 -0400
committerRich Felker <dalias@aerifal.cx>2013-08-03 03:16:24 -0400
commit0a05eace163cee9b08571d2ff9d90f5e82d9c228 (patch)
treeda9d2dee9ac95bc75101e87cb300c77eff744bb8 /src/unistd/setegid.c
parent89384f78ce79efba22ab3a77e50c3f2a95233f8c (diff)
downloadmusl-0a05eace163cee9b08571d2ff9d90f5e82d9c228.tar.gz
fix faccessat to support AT_EACCESS flag
this is another case of the kernel syscall failing to support flags where it needs to, leading to horrible workarounds in userspace. this time the workaround requires changing uid/gid, and that's not safe to do in the current process. in the worst case, kernel resource limits might prevent recovering the original values, and then there would be no way to safely return. so, use the safe but horribly inefficient alternative: forking. clone is used instead of fork to suppress signals from the child. fortunately this worst-case code is only needed when effective and real ids mismatch, which mainly happens in suid programs.
Diffstat (limited to 'src/unistd/setegid.c')
0 files changed, 0 insertions, 0 deletions