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

[issue1341] printenv(1): don't allow '=' in name


From: "Stathis Kamperis \(via DragonFly issue tracker\)" <sinknull@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 20 Apr 2009 15:10:41 +0000

New submission from Stathis Kamperis <ekamperi@gmail.com>:

Salute.

After the recent libc changes, we no more allow environmental variables to have
an '=' character in their name. The printenv(1) utility isn't aware of that, so
it embarrasses itself, along with misleading the user:

$ env foo=bar=lala=123 printenv foo
bar=lala=123
$ env foo=bar=lala=123 printenv foo=bar
lala=123
$ env foo=bar=lala=123 printenv foo=bar=lala
123

In the above example, it gives the impression that there are 3 distinct
variables with names: foo, foo=bar, foo=bar=lala, which is wrong.

After the patch:

$ env foo=bar=lala=123 printenv foo
bar=lala=123
$ env foo=bar=lala=123 printenv foo=bar
printenv: variable name can't contain an '=' character
$ 

What do you think ? Ship it ?

Cheers,
Stathis

----------
assignedto: Beket
files: printenv.diff
messages: 6426
nosy: Beket
priority: bug
status: unread
title: printenv(1): don't allow '=' in name

_____________________________________________________
DragonFly issue tracker <bugs@lists.dragonflybsd.org>
<http://bugs.dragonflybsd.org/issue1341>
_____________________________________________________

Attachment: printenv.diff
Description: Binary data



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