From 0b4a0e4e11684e4650c59945fb75c66fb9b1b5ac Mon Sep 17 00:00:00 2001 From: jeremy <> Date: Sun, 23 Sep 2012 16:08:04 +0000 Subject: Make setenv(3) consistent with unsetenv(3), giving EINVAL if passed an empty name, NULL pointer, or a name containing an '=' character. OK millert@, guenther@ --- src/lib/libc/stdlib/getenv.3 | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'src/lib/libc/stdlib/getenv.3') diff --git a/src/lib/libc/stdlib/getenv.3 b/src/lib/libc/stdlib/getenv.3 index 8c2b633f25..f987eb13a1 100644 --- a/src/lib/libc/stdlib/getenv.3 +++ b/src/lib/libc/stdlib/getenv.3 @@ -29,9 +29,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: getenv.3,v 1.17 2012/06/02 00:14:16 guenther Exp $ +.\" $OpenBSD: getenv.3,v 1.18 2012/09/23 16:08:04 jeremy Exp $ .\" -.Dd $Mdocdate: June 2 2012 $ +.Dd $Mdocdate: September 23 2012 $ .Dt GETENV 3 .Os .Sh NAME @@ -53,14 +53,6 @@ .Sh DESCRIPTION These functions set, unset, and fetch environment variables from the host .Em environment list . -For compatibility with differing environment conventions, the given argument -.Fa name -may be appended with an equal sign -.Dq Li \&= -followed by zero or more characters, -and -.Fa value -may be prepended with an equal sign. .Pp The .Fn getenv @@ -125,19 +117,15 @@ The .Fn setenv or .Fn unsetenv -function was passed a +function was passed an empty +.Ar name +or a NULL pointer, or was passed a .Ar name containing an .Sq = character. .Pp The -.Fn unsetenv -function was passed an empty -.Ar name -or a NULL pointer. -.Pp -The .Fn putenv function was passed a .Ar string -- cgit v1.2.3-55-g6feb