summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/setenv.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Make setenv(3) consistent with unsetenv(3), giving EINVAL if passedjeremy2012-09-231-3/+5
| | | | | | an empty name, NULL pointer, or a name containing an '=' character. OK millert@, guenther@
* Check for duplicate variables in the environment when setting a valuemillert2010-08-231-7/+19
| | | | via setenv() or putenv(). OK miod@
* Make unsetenv(NULL) and unsetenv("") give EINVAL, per POSIX. ok deraadt@naddy2010-06-291-1/+5
|
* Don't assume that we can overwrite strings in the environment.millert2009-06-041-1/+3
| | | | | Someone may have passed a read-only string to putenv() (I'm looking at you cron!).
* Make putenv(), setenv() and unsetenv() standards compliant. Themillert2009-06-031-11/+68
| | | | | | standard explicitly disallows passing setenv a name with a '=' in it but historic BSD behavior is to allow this but to ignore the '=' and anything after it.
* zap remaining rcsid.espie2005-08-081-4/+1
| | | | | | Kill old files that are no longer compiled. okay theo
* ansi + de-registerpat2005-03-301-7/+3
| | | | ok otto deraadt
* Stash the environment pointer we get from realloc() instead of justmillert2005-02-161-32/+24
| | | | | | | | setting a flag. That way when we are called again we can be sure to realloc() the right thing, regardless of the current value of environ. When the stashed value != environ (or when we are called for the first time), copy the existing entries from environ and set environ to the new value. OK deraadt@, beck@, djm@
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* use proper __findenv() prototype; millert@ okmickey2002-12-101-2/+3
|
* a first pass at -Wallderaadt2001-07-091-3/+4
|
* Don't override environ if realloc() fails. Pointed out bymillert1998-02-021-3/+4
| | | | Dave Bodenstab <imdave@mcs.net>
* Fix RCS idstholo1996-08-191-2/+1
| | | | Make sure everything uses {SYS,}LIBC_SCCS properly
* initial import of NetBSD treederaadt1995-10-181-0/+120