libc: add issetugid()
commit94246e65e20b5390d53858447526b231ef1afd67
authorAnthony G. Basile <blueness@gentoo.org>
Mon, 18 Aug 2014 11:56:08 +0000 (18 07:56 -0400)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mon, 18 Aug 2014 13:19:46 +0000 (18 15:19 +0200)
tree3b7f55ab2a0b43cc72c114a1b68253174fd0bfe1
parent8c93ff92c37e2ed577c593236d24d09d7dcaa3ab
libc: add issetugid()

issetugid() returns 1 if the process environment or memory address space
is considered tainted, and returns 0 otherwise.  This happens, for example,
when a process's privileges are elevated by the setuid or setgid flags on
an executable belonging to root.  This function first appeard in OpenBSD 2.0
and is needed for the LibreSSL.

This patch follows the same logic as the equivalent musl commit.  For more
information see the commit message at

http://git.musl-libc.org/cgit/musl/commit/?id=ddddec106fd17c3aca3287005d21e92f742aa9d4

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
include/unistd.h
libc/misc/file/issetugid.c [new file with mode: 0644]
libc/misc/internals/__uClibc_main.c