musl - an implementation of the standard library for Linux-based systems
Go to file
Brent Cook ddddec106f add issetugid function to check for elevated privilege
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 7bece9c209,
the musl implementation did not emulate AT_SECURE if missing, which
would result in a false positive. since musl actually does partially
support kernels that lack AT_SECURE, this was problematic.

the intent is that library authors will use issetugid if its
availability is detected at build time, and only fall back to the
unreliable alternatives on systems that lack it.

patch by Brent Cook. commit message/rationale by Rich Felker.
2014-07-19 21:39:18 -04:00
arch fix or1k atomic store 2014-07-19 20:42:15 -04:00
crt add or1k (OpenRISC 1000) architecture port 2014-07-18 14:10:23 -04:00
dist add another example option to dist/config.mak 2012-04-24 16:49:11 -04:00
include add issetugid function to check for elevated privilege 2014-07-19 21:39:18 -04:00
lib new solution for empty lib dir (old one had some problems) 2011-02-17 17:12:52 -05:00
src add issetugid function to check for elevated privilege 2014-07-19 21:39:18 -04:00
tools fix system breakage window during make install due to permissions 2014-01-15 22:29:13 -05:00
.gitignore add version.h to .gitignore; it is a generated file 2014-01-21 01:06:42 -05:00
COPYRIGHT update COPYRIGHT file with additional contributor information 2014-03-20 00:34:19 -04:00
INSTALL add note to INSTALL file about gcc 4.9.0 not being supported 2014-06-25 14:16:15 -04:00
Makefile add tarball-producing targets to Makefile for ease of release 2014-06-25 16:14:37 -04:00
README update version reference in the README file 2014-06-25 14:16:53 -04:00
VERSION release 1.1.3 2014-06-25 16:18:05 -04:00
WHATSNEW release 1.1.3 2014-06-25 16:18:05 -04:00
configure add or1k (OpenRISC 1000) architecture port 2014-07-18 14:10:23 -04:00

README

    musl libc

musl, pronounced like the word "mussel", is an MIT-licensed
implementation of the standard C library targetting the Linux syscall
API, suitable for use in a wide range of deployment environments. musl
offers efficient static and dynamic linking support, lightweight code
and low runtime overhead, strong fail-safe guarantees under correct
usage, and correctness in the sense of standards conformance and
safety. musl is built on the principle that these goals are best
achieved through simple code that is easy to understand and maintain.

The 1.1 release series for musl features coverage for all interfaces
defined in ISO C99 and POSIX 2008 base, along with a number of
non-standardized interfaces for compatibility with Linux, BSD, and
glibc functionality.

For basic installation instructions, see the included INSTALL file.
Information on full musl-targeted compiler toolchains, system
bootstrapping, and Linux distributions built on musl can be found on
the project website:

    http://www.musl-libc.org/