From owner-freebsd-stable@FreeBSD.ORG Mon Jun 9 19:02:21 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB1FC106564A for ; Mon, 9 Jun 2008 19:02:21 +0000 (UTC) (envelope-from tss@iki.fi) Received: from dovecot.org (dovecot.org [82.118.211.50]) by mx1.freebsd.org (Postfix) with ESMTP id 6F2518FC13 for ; Mon, 9 Jun 2008 19:02:21 +0000 (UTC) (envelope-from tss@iki.fi) Received: from [192.168.10.2] (xdsl-177-118.nblnetworks.fi [217.30.177.118]) by dovecot.org (Postfix) with ESMTP id 21FE1FA8A12 for ; Mon, 9 Jun 2008 21:40:58 +0300 (EEST) From: Timo Sirainen To: freebsd-stable@freebsd.org Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-P5dWbwhPQ5WN/kDDEBIO" Date: Mon, 09 Jun 2008 21:40:54 +0300 Message-Id: <1213036854.3904.967.camel@hurina> Mime-Version: 1.0 X-Mailer: Evolution 2.22.1 Subject: Environment clearing broken in 7.0 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2008 19:02:21 -0000 --=-P5dWbwhPQ5WN/kDDEBIO Content-Type: text/plain Content-Transfer-Encoding: quoted-printable I think clearing environment using: environ[0] =3D NULL; has been kind of a semi-standard for a while now. At least Dovecot and Postfix clears their environment this way. But this no longer works in FreeBSD 7.0 (putenv(), environ[0]=3DNULL, putenv() -> everything is visible again). Was this change intended, or will this be fixed? Looks like I could work around this by using: environ =3D NULL; but I'm afraid what other OSes that change would break. I guess going through environ and unsetenv()ing everything would work too, but it feels annoyingly slow for such a simple operation. --=-P5dWbwhPQ5WN/kDDEBIO Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBITXk2yUhSUUBViskRAqQaAKCHRzyGcbn6gvwoE+WnEhOcs4yvMACgkrsT QNcYAgT8cy1CMbc/dq3VBTk= =FPt5 -----END PGP SIGNATURE----- --=-P5dWbwhPQ5WN/kDDEBIO--