about summary refs log tree commit diff
path: root/crt/Scrt1.c
diff options
context:
space:
mode:
authorMarkus Wichmann <nullplan@gmx.net>2023-11-02 17:39:33 +0100
committerRich Felker <dalias@aerifal.cx>2023-11-06 13:07:11 -0500
commit7bb11f75c50386ca4ac7af32365754135a027193 (patch)
treeeb9bc3d40deb15ac58048c9ff69962025bbbb6c8 /crt/Scrt1.c
parent7f3a2925369c00abc33457400e33632e6dacb8ae (diff)
downloadmusl-7bb11f75c50386ca4ac7af32365754135a027193.tar.gz
musl-7bb11f75c50386ca4ac7af32365754135a027193.tar.xz
musl-7bb11f75c50386ca4ac7af32365754135a027193.zip
ensure valid setxid return value in an unexpected error case
If __synccall() fails to capture all threads because tkill fails for
some reason other than EAGAIN, then the callback given will never be
executed, so nothing will ever overwrite the initial value. So that is
the value that will be returned from the function. The previous setting
of 1 is not a valid value for setuid() et al. to return.

I chose -EAGAIN since I don't know the reason the synccall failed ahead
of time, but EAGAIN is a specified error code for a possibly temporary
failure in setuid().
Diffstat (limited to 'crt/Scrt1.c')
0 files changed, 0 insertions, 0 deletions