Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Apr 2001 13:49:23 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        "Andrew R. Reiter" <arr@watson.org>
Cc:        freebsd-audit@FreeBSD.ORG
Subject:   Re: audit work:  libc's setenv() and putenv()
Message-ID:  <Pine.BSF.4.21.0104271330300.2367-100000@besplex.bde.org>
In-Reply-To: <Pine.NEB.3.96L.1010426191933.61693A-100000@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 26 Apr 2001, Andrew R. Reiter wrote:

> Although, the actions of putenv("=blah"); returning 0 seems weird and
> after talking to Theo a bit.. I've kind of decided to retract this patch
> :-)
> 
> Basically, the sanity checks should not be there.. which I was questioning
> anyway (check below).

Yes, they are like sanity checks for strlen(NULL).  Returning an error code
is worse than dumping core.

I prefer a core dump for setenv("=blah") too.  The behaviour is currently
non-deterministic.

> Also, since openbsd, solaris _and_ freebsd all do
> the returning of 0 on the above call, then I think it would be bad to
> change this functionality.  

Hardly anything checks for errors from setenv() of course.  E.g., the
not unimportant login utility "handles" errors from setenv() by explicitly
ignoring them.

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0104271330300.2367-100000>