freebsd-skq/lib/libc
scf e0b5c971c2 Detect if the application has cleared the environ variable by setting
the first value (environ[0]) to NULL.  This is in addition to the
current detection of environ being replaced, which includes being set to
NULL.  Without this fix, the environment is not truly wiped, but appears
to be by getenv() until an *env() call is made to alter the enviroment.

This change is necessary to support those applications that use this
method for clearing environ such as Dovecot and Postfix.  Applications
such as Sendmail and the base system's env replace environ (already
detected).  While neither of these methods are defined by SUSv3, it is
best to support them due to historic reasons and in lieu of a clean,
defined method.

Add extra units tests for clearing environ using four different methods:
1. Set environ to NULL pointer.
2. Set environ[0] to NULL pointer.
3. Set environ to calloc()'d NULL-terminated array.
4. Set environ to static NULL-terminated array.

Noticed by:	Timo Sirainen

MFC after:	3 days
2008-08-02 02:34:35 +00:00
..
amd64 Two FP-related setjmp/longjmp changes: 2008-06-28 17:55:43 +00:00
arm Arrange so that the NaN returned by strtod("nan", NULL) is the same as 2007-12-16 21:15:09 +00:00
compat-43 Use C comments since we now preprocess these files with CPP. 2007-04-29 14:05:22 +00:00
db getopt(3) returns -1, not EOF. 2008-02-18 03:19:25 +00:00
gdtoa Unbreak the build for arm and powerpc. 2008-04-12 14:53:52 +00:00
gen Convert popen()'s `pidlist' to a SLIST, for consistency. 2008-07-29 16:29:59 +00:00
gmon Remove .mcount from gmon's Symbol map and add it to the appropriate 2007-05-13 14:16:55 +00:00
i386 We should also save and restore the MXCSR as on amd64, but detecting 2008-06-28 17:58:06 +00:00
ia64 Add an alternative view of the bits in an 80-bit long double (64+16 2008-01-17 16:39:07 +00:00
include Turn execvpe() into an internal libc routine. 2008-06-23 05:22:06 +00:00
inet Fix issues which allow snooping on ptys. [08:01] 2008-01-14 22:56:05 +00:00
isc Merge BIND 9.4.1 into main chunk. 2007-06-03 17:20:27 +00:00
locale Don't allocate the constant array "props" on the stack in wctype. 2008-03-17 18:22:23 +00:00
mips Add mips support libc from the mips2-jnpr branch of perforce. 2008-04-26 12:08:02 +00:00
nameser This commit was generated by cvs2svn to compensate for changes in r174223, 2007-12-03 15:07:58 +00:00
net - AI_ALL and AI_V4MAPPED flags are currently not supported 2008-07-01 22:59:20 +00:00
nls Use C comments since we now preprocess these files with CPP. 2007-04-29 14:05:22 +00:00
posix1e The libc acl_valid(3) function validates the contents of a POSIX.1e ACL. 2008-07-13 16:37:51 +00:00
powerpc Add support files for compiling with soft-float. This has been 2008-04-27 18:34:34 +00:00
quad Fix a typo that prevented the quad symbols from being exported 2007-07-06 13:42:24 +00:00
regex getopt(3) returns -1, not EOF. 2008-02-18 03:19:25 +00:00
resolv Allow underscore in domain names while resolving. While having underscore 2008-02-16 00:16:49 +00:00
rpc Don't call xdrrec_skiprecord in the non-blocking case. If 2008-03-30 09:36:17 +00:00
softfloat Use C comments since we now preprocess these files with CPP. 2007-04-29 14:05:22 +00:00
sparc64 Fix some bugs that caused sparc64's quad precision sqrt to get 2008-04-12 03:10:13 +00:00
stdio Fix a few bugs with the _gettemp() routine which implements mkstemp(), 2008-07-28 21:18:59 +00:00
stdlib Detect if the application has cleared the environ variable by setting 2008-08-02 02:34:35 +00:00
stdtime Clarify that "ante meridiem" and "post meridiem" mean the same thing 2008-05-16 04:33:04 +00:00
string Add memrchr(3). 2008-04-10 00:12:44 +00:00
sys Fix cut-n-paste-o 2008-07-25 01:09:36 +00:00
uuid Use C comments since we now preprocess these files with CPP. 2007-04-29 14:05:22 +00:00
xdr Don't assume that there is readable data on the stream after the 2008-03-30 09:35:04 +00:00
yp Fix some "in in" typos in comments. 2008-03-26 07:32:08 +00:00
Makefile Enable GCC stack protection (aka Propolice) for userland: 2008-06-25 21:33:28 +00:00
Versions.def Keep versions on a dependency chain to exclude even remote possiblity 2008-05-07 15:39:34 +00:00