NetBSD-Bugs archive

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

bin/41774: printenv doesn't handle well input with '='

>Number:         41774
>Category:       bin
>Synopsis:       printenv doesn't handle well input with '='
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 24 11:15:00 +0000 2009
>Originator:     Stathis Kamperis
>Release:        NetBSD 5.0_STABLE
Aristotle University of Thessaloniki
NetBSD xxx 5.0_STABLE NetBSD 5.0_STABLE (xxx) #1: Thu Jul  9 21:38:56 CEST 2009 
 xxx:/usr/objdir/sys/arch/i386/compile/xxx i386

$ env foo=bar=lala printenv foo
$ env foo=bar=lala printenv foo=bar         <---- there is no such variable
lala                                        <---- yet printenv reports one

And I'm saying that there is no such variable, because POSIX mandates that
environmental variables don't contain a '='. So 'foo=bar=lala' is a variable
named 'foo' that equals to 'bar=lala'.


I have a fix for DragonFly, here

but not so sure how it applies to NetBSD (didn't check the code).

Home | Main Index | Thread Index | Old Index