<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/stdlib/getenv.c, branch release/7.0.0_cvs</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>This commit was manufactured by cvs2svn to create tag</title>
<updated>2008-02-24T05:45:17+00:00</updated>
<author>
<name>cvs2svn</name>
<email>cvs2svn@FreeBSD.org</email>
</author>
<published>2008-02-24T05:45:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a9c219fa3cec18ef9f30edec6fa106bf0e2d423d'/>
<id>a9c219fa3cec18ef9f30edec6fa106bf0e2d423d</id>
<content type='text'>
'RELENG_7_0_0_RELEASE'.

This commit was manufactured to restore the state of the 7.0-RELEASE image.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
'RELENG_7_0_0_RELEASE'.

This commit was manufactured to restore the state of the 7.0-RELEASE image.
</pre>
</div>
</content>
</entry>
<entry>
<title>The precision for a string argument in a call to warnx() needs to be cast</title>
<updated>2007-09-22T02:30:44+00:00</updated>
<author>
<name>Sean Farley</name>
<email>scf@FreeBSD.org</email>
</author>
<published>2007-09-22T02:30:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8e5b20fa9c48e70a31578d3272401b3e94b7f53d'/>
<id>8e5b20fa9c48e70a31578d3272401b3e94b7f53d</id>
<content type='text'>
to an int to remove the warning from using a size_t variable on 64-bit
platforms.

Submitted by:	Xin LI &lt;delphij@FreeBSD.org&gt;
Approved by:	wes
Approved by:	re (kensmith)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
to an int to remove the warning from using a size_t variable on 64-bit
platforms.

Submitted by:	Xin LI &lt;delphij@FreeBSD.org&gt;
Approved by:	wes
Approved by:	re (kensmith)
</pre>
</div>
</content>
</entry>
<entry>
<title>Skip rebuilding environ in setenv() only upon reuse of an active variable;</title>
<updated>2007-09-15T21:48:54+00:00</updated>
<author>
<name>Sean Farley</name>
<email>scf@FreeBSD.org</email>
</author>
<published>2007-09-15T21:48:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=21c376969a92384b3d4bd7638283474a66c9a737'/>
<id>21c376969a92384b3d4bd7638283474a66c9a737</id>
<content type='text'>
inactive variables should cause a rebuild of environ, otherwise, exec()'d
processes will be missing a variable in environ that has been unset then
set.

Submitted by:	Taku Yamamoto &lt;taku@tackymt.homeip.net&gt;
Reviewed by:	ache
Approved by:	wes (mentor)
Approved by:	re (kensmith)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
inactive variables should cause a rebuild of environ, otherwise, exec()'d
processes will be missing a variable in environ that has been unset then
set.

Submitted by:	Taku Yamamoto &lt;taku@tackymt.homeip.net&gt;
Reviewed by:	ache
Approved by:	wes (mentor)
Approved by:	re (kensmith)
</pre>
</div>
</content>
</entry>
<entry>
<title>Added environ-replacement detection.  For programs that "clean" (i.e., su)</title>
<updated>2007-07-20T23:30:13+00:00</updated>
<author>
<name>Sean Farley</name>
<email>scf@FreeBSD.org</email>
</author>
<published>2007-07-20T23:30:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=9bab236702b4f33a990011b08a2deebbb8ea6e0c'/>
<id>9bab236702b4f33a990011b08a2deebbb8ea6e0c</id>
<content type='text'>
or replace (i.e., zdump) the environment after a call to setenv(), putenv()
or unsetenv() has been made, a few changes were made.
  - getenv() will return the value from the new environ array.
  - setenv() was split into two functions:  __setenv() which is most of the
    previous setenv() without checks on the name and setenv() which
    contains the checks before calling __setenv().
  - setenv(), putenv() and unsetenv() will unset all previous values and
    call __setenv() on all entries in the new environ array which in turn
    adds them to the end of the envVars array.  Calling __setenv() instead
    of setenv() is done to avoid the temporary replacement of the '=' in a
    string with a NUL byte.  Some strings may be read-only data.

Added more regression checks for clearing the environment array.

Replaced gettimeofday() with getrusage() in timing regression check for
better accuracy.

Fixed an off-by-one bug in __remove_putenv() in the use of memmove().  This
went unnoticed due to the allocation of double the number of environ
entries when building envVars.

Fixed a few spelling mistakes in the comments.

Reviewed by:	ache
Approved by:	wes
Approved by:	re (kensmith)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
or replace (i.e., zdump) the environment after a call to setenv(), putenv()
or unsetenv() has been made, a few changes were made.
  - getenv() will return the value from the new environ array.
  - setenv() was split into two functions:  __setenv() which is most of the
    previous setenv() without checks on the name and setenv() which
    contains the checks before calling __setenv().
  - setenv(), putenv() and unsetenv() will unset all previous values and
    call __setenv() on all entries in the new environ array which in turn
    adds them to the end of the envVars array.  Calling __setenv() instead
    of setenv() is done to avoid the temporary replacement of the '=' in a
    string with a NUL byte.  Some strings may be read-only data.

Added more regression checks for clearing the environment array.

Replaced gettimeofday() with getrusage() in timing regression check for
better accuracy.

Fixed an off-by-one bug in __remove_putenv() in the use of memmove().  This
went unnoticed due to the allocation of double the number of environ
entries when building envVars.

Fixed a few spelling mistakes in the comments.

Reviewed by:	ache
Approved by:	wes
Approved by:	re (kensmith)
</pre>
</div>
</content>
</entry>
<entry>
<title>Significantly reduce the memory leak as noted in BUGS section for</title>
<updated>2007-07-04T00:00:41+00:00</updated>
<author>
<name>Sean Farley</name>
<email>scf@FreeBSD.org</email>
</author>
<published>2007-07-04T00:00:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=2966d28c322dcfa4b9db2558da0b91839e7798b9'/>
<id>2966d28c322dcfa4b9db2558da0b91839e7798b9</id>
<content type='text'>
setenv(3) by tracking the size of the memory allocated instead of using
strlen() on the current value.

Convert all calls to POSIX from historic BSD API:
 - unsetenv returns an int.
 - putenv takes a char * instead of const char *.
 - putenv no longer makes a copy of the input string.
 - errno is set appropriately for POSIX.  Exceptions involve bad environ
   variable and internal initialization code.  These both set errno to
   EFAULT.

Several patches to base utilities to handle the POSIX changes from
Andrey Chernov's previous commit.  A few I re-wrote to use setenv()
instead of putenv().

New regression module for tools/regression/environ to test these
functions.  It also can be used to test the performance.

Bump __FreeBSD_version to 700050 due to API change.

PR:		kern/99826
Approved by:	wes
Approved by:	re (kensmith)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
setenv(3) by tracking the size of the memory allocated instead of using
strlen() on the current value.

Convert all calls to POSIX from historic BSD API:
 - unsetenv returns an int.
 - putenv takes a char * instead of const char *.
 - putenv no longer makes a copy of the input string.
 - errno is set appropriately for POSIX.  Exceptions involve bad environ
   variable and internal initialization code.  These both set errno to
   EFAULT.

Several patches to base utilities to handle the POSIX changes from
Andrey Chernov's previous commit.  A few I re-wrote to use setenv()
instead of putenv().

New regression module for tools/regression/environ to test these
functions.  It also can be used to test the performance.

Bump __FreeBSD_version to 700050 due to API change.

PR:		kern/99826
Approved by:	wes
Approved by:	re (kensmith)
</pre>
</div>
</content>
</entry>
<entry>
<title>Back out all POSIXified *env() changes.</title>
<updated>2007-05-01T16:02:44+00:00</updated>
<author>
<name>Andrey A. Chernov</name>
<email>ache@FreeBSD.org</email>
</author>
<published>2007-05-01T16:02:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ba174a5e38b1ab764c4a36ef4dd83e80c4add148'/>
<id>ba174a5e38b1ab764c4a36ef4dd83e80c4add148</id>
<content type='text'>
Not because I admit they are technically wrong and not because of bug
reports (I receive nothing). But because I surprisingly meets so
strong opposition and resistance so lost any desire to continue that.

Anyone who interested in POSIX can dig out what changes and how
through cvs diffs.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Not because I admit they are technically wrong and not because of bug
reports (I receive nothing). But because I surprisingly meets so
strong opposition and resistance so lost any desire to continue that.

Anyone who interested in POSIX can dig out what changes and how
through cvs diffs.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make putenv() fully conforms to Open Group specs Issue 6</title>
<updated>2007-04-30T16:56:18+00:00</updated>
<author>
<name>Andrey A. Chernov</name>
<email>ache@FreeBSD.org</email>
</author>
<published>2007-04-30T16:56:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=15fdb055e5a9a944685cf8bcf94e5858589a6740'/>
<id>15fdb055e5a9a944685cf8bcf94e5858589a6740</id>
<content type='text'>
(also IEEE Std 1003.1-2001)

The specs explicitly says that altering passed string
should change the environment, i.e. putenv() directly puts its arg
into environment (unlike setenv() which just copies it there).
It means that putenv() can't be implemented via setenv()
(like we have before) at all. Putenv() value lives (allows modifying)
up to the next putenv() or setenv() call.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(also IEEE Std 1003.1-2001)

The specs explicitly says that altering passed string
should change the environment, i.e. putenv() directly puts its arg
into environment (unlike setenv() which just copies it there).
It means that putenv() can't be implemented via setenv()
(like we have before) at all. Putenv() value lives (allows modifying)
up to the next putenv() or setenv() call.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make setenv, putenv, getenv and unsetenv conforming to Open Group specs</title>
<updated>2007-04-30T02:25:02+00:00</updated>
<author>
<name>Andrey A. Chernov</name>
<email>ache@FreeBSD.org</email>
</author>
<published>2007-04-30T02:25:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=bdda89347122e9814a3a681adfc4d950fa914066'/>
<id>bdda89347122e9814a3a681adfc4d950fa914066</id>
<content type='text'>
Issue 6 (also IEEE Std 1003.1-2001) in following areas:
args, return, errors.

Putenv still needs rewriting because specs explicitly says that
altering passed string later should change the environment (currently we
copy the string so can't provide that).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Issue 6 (also IEEE Std 1003.1-2001) in following areas:
args, return, errors.

Putenv still needs rewriting because specs explicitly says that
altering passed string later should change the environment (currently we
copy the string so can't provide that).
</pre>
</div>
</content>
</entry>
<entry>
<title>Per Regents of the University of Calfornia letter, remove advertising</title>
<updated>2007-01-09T00:28:16+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2007-01-09T00:28:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c879ae3536e6d92b8d96c8965c5b05fcb9541520'/>
<id>c879ae3536e6d92b8d96c8965c5b05fcb9541520</id>
<content type='text'>
clause.

# If I've done so improperly on a file, please let me know.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
clause.

# If I've done so improperly on a file, please let me know.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove __P() usage.</title>
<updated>2002-03-21T22:49:10+00:00</updated>
<author>
<name>David E. O'Brien</name>
<email>obrien@FreeBSD.org</email>
</author>
<published>2002-03-21T22:49:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c05ac53b8bbbbd998e18c6544011dd90f0f082da'/>
<id>c05ac53b8bbbbd998e18c6544011dd90f0f082da</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
