[PATCH] libc: add issetugid()

Rich Felker dalias at libc.org
Tue Jul 22 02:44:06 UTC 2014


On Mon, Jul 21, 2014 at 08:53:19PM -0400, basile at opensource.dyc.edu wrote:
> From: "Anthony G. Basile" <blueness at gentoo.org>
> 
> 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.

Looking at your patch, I think you missed the static linking case. It
might also be nice to mention that this interface was just added in
musl after a bit of discussion with people from the BSD and glibc
sides. The commit message with rationale is here:

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

Rich


More information about the uClibc mailing list