mirror of
git://git.musl-libc.org/musl
synced 2025-03-01 09:10:25 +00:00
this function provides a way for third-party library code to use the
same logic that's used internally in libc for suppressing untrusted
input/state (e.g. the environment) when the application is running
with privleges elevated by the setuid or setgid bit or some other
mechanism. its semantics are intended to match the openbsd function by
the same name.
there was some question as to whether this function is necessary:
getauxval(AT_SECURE) was proposed as an alternative. however, this has
several drawbacks. the most obvious is that it asks programmers to be
aware of an implementation detail of ELF-based systems (the aux
vector) rather than simply the semantic predicate to be checked. and
trying to write a safe, reliable version of issetugid in terms of
getauxval is difficult. for example, early versions of the glibc
getauxval did not report ENOENT, which could lead to false negatives
if AT_SECURE was not present in the aux vector (this could probably
only happen when running on non-linux kernels under linux emulation,
since glibc does not support linux versions old enough to lack
AT_SECURE). as for musl, getauxval has always properly reported
errors, but prior to commit
|
||
---|---|---|
.. | ||
arpa | ||
net | ||
netinet | ||
netpacket | ||
scsi | ||
sys | ||
aio.h | ||
alloca.h | ||
alltypes.h.in | ||
ar.h | ||
assert.h | ||
byteswap.h | ||
complex.h | ||
cpio.h | ||
crypt.h | ||
ctype.h | ||
dirent.h | ||
dlfcn.h | ||
elf.h | ||
endian.h | ||
err.h | ||
errno.h | ||
fcntl.h | ||
features.h | ||
fenv.h | ||
float.h | ||
fmtmsg.h | ||
fnmatch.h | ||
ftw.h | ||
getopt.h | ||
glob.h | ||
grp.h | ||
iconv.h | ||
ifaddrs.h | ||
inttypes.h | ||
iso646.h | ||
langinfo.h | ||
lastlog.h | ||
libgen.h | ||
libintl.h | ||
limits.h | ||
link.h | ||
locale.h | ||
malloc.h | ||
math.h | ||
memory.h | ||
mntent.h | ||
monetary.h | ||
mqueue.h | ||
netdb.h | ||
nl_types.h | ||
paths.h | ||
poll.h | ||
pthread.h | ||
pty.h | ||
pwd.h | ||
regex.h | ||
resolv.h | ||
sched.h | ||
search.h | ||
semaphore.h | ||
setjmp.h | ||
shadow.h | ||
signal.h | ||
spawn.h | ||
stdalign.h | ||
stdarg.h | ||
stdbool.h | ||
stddef.h | ||
stdint.h | ||
stdio_ext.h | ||
stdio.h | ||
stdlib.h | ||
stdnoreturn.h | ||
string.h | ||
strings.h | ||
stropts.h | ||
syscall.h | ||
sysexits.h | ||
syslog.h | ||
tar.h | ||
termios.h | ||
tgmath.h | ||
time.h | ||
ucontext.h | ||
ulimit.h | ||
unistd.h | ||
utime.h | ||
utmp.h | ||
utmpx.h | ||
values.h | ||
wait.h | ||
wchar.h | ||
wctype.h | ||
wordexp.h |