# breaks scripts that eval "$(export -p)"
severity 480371 important
tags 480371 + upstream
found 480371 dash/0.5.6.1-1~exp2
quit

Hi,

Vincent Bernat wrote:

> Here is another  example of variable that should not  be shown in export
> -p:
>
> $ env 'bogus-variable=18' dash -c 'export -p' | grep bogus-variable
> export bogus-variable='18'
> $ dash -c "export bogus-variable='18'"
> export: 1: bogus-variable: bad variable name

I agree.  From XBD 8.1 "Environment variables":

        Environment variable names used by the utilities in the Shell
        and Utilities volume of POSIX.1-2008 consist solely of
        uppercase letters, digits, and the <underscore> ('_') from the
        characters defined in Table 6-1 and do not begin with a digit.
        Other characters may be permitted by an implementation;
        applications shall tolerate the presence of such names.

This means bogus-variable should not be used by sh -c 'export -p' (and
as you mentioned, output from 'export -p' needs to be suitable input
for the shell).

Thanks for reporting, and sorry for a slow response.

Hope that helps,
Jonathan



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to