From owner-svn-src-head@FreeBSD.ORG Tue Dec 1 15:51:27 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78595106568B; Tue, 1 Dec 2009 15:51:27 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (mail.farley.org [IPv6:2001:470:1f0f:20:2::11]) by mx1.freebsd.org (Postfix) with ESMTP id 3FC3D8FC1D; Tue, 1 Dec 2009 15:51:27 +0000 (UTC) Received: from thor.farley.org (HPooka@thor.farley.org [IPv6:2001:470:1f0f:20:1::5]) by mail.farley.org (8.14.3/8.14.3) with ESMTP id nB1FpQJd059868; Tue, 1 Dec 2009 09:51:26 -0600 (CST) (envelope-from scf@FreeBSD.org) Date: Tue, 1 Dec 2009 09:51:26 -0600 (CST) From: "Sean C. Farley" To: Brian Feldman In-Reply-To: <200912010504.nB154VnS053167@svn.freebsd.org> Message-ID: References: <200912010504.nB154VnS053167@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail.farley.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r199983 - in head: lib/libc/stdlib tools/regression/environ X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2009 15:51:27 -0000 On Tue, 1 Dec 2009, Brian Feldman wrote: > Author: green > Date: Tue Dec 1 05:04:31 2009 > New Revision: 199983 > URL: http://svn.freebsd.org/changeset/base/199983 > > Log: > Do not gratuitously fail *env(3) operations due to corrupt ('='-less) > **environ entries. This puts non-getenv(3) operations in line with > getenv(3) in that bad environ entries do not cause all operations to > fail. There is still some inconsistency in that getenv(3) in the > absence of any environment-modifying operation does not emit corrupt > environ entry warnings. > > I also fixed another inconsistency in getenv(3) where updating the > global environ pointer would not be reflected in the return values. > It would have taken an intermediary setenv(3)/putenv(3)/unsetenv(3) > in order to see the change. A simpler patch[1] is to have the build and merge routines skip unusable environ entries and continue to the next entry. It still can return an error due to memory allocation problems, but those do not necessarily reflect a corrupt environ array. I want to test a few more things first. Sean 1. http://people.freebsd.org/~scf/getenv-1.patch -- scf@FreeBSD.org