DragonFly commits List (threaded) for 2009-04
DragonFly BSD
DragonFly commits List (threaded) for 2009-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

DragonFly-2.2.0.21.g31e173 DragonFly_RELEASE_2_2 usr.bin/env env.c


From: Stathis Kamperis <beket@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 21 Apr 2009 13:35:48 -0700 (PDT)

commit 31e17398948035bd0ce33d814c7a1e587995243a
Author: Stathis Kamperis <beket@dragonflybsd.org>
Date:   Tue Apr 21 23:22:27 2009 +0000

    env(1): unbreak build of 2_2 release branch under HEAD
    
    The problem exhibits when running an old env(1), which is part of
    the bootstrap tools of 2_2, in a host system with new libc/setenv(3).
    
    When a "value=name" string is supplied to the old env(1), it doesn't
    actually break it into 2 pieces (ie null terminate on '='). It just
    creates two pointers, one pointing to the start of "value" and one
    to the start of "name". These pointers are subsequently passed to
    setenv(3). When new setenv(3) encounters the '=' character as part
    of the "name", it fails with EINVAL. Which is exactly what it should
    do, complying with the POSIX standard.
    
    This patch has been tested and found to:
    1) unbreak the build of 2_2 release branch under HEAD
    2) not affect (i.e., break) the build of 2_2 under a 2.2 host system
    3) not affect (i.e., break) the build of 2_2 under a 2.0 host system

Summary of changes:
 usr.bin/env/env.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/31e17398948035bd0ce33d814c7a1e587995243a


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]