Re: [PATCH] docs: mention that not all values can be exported

Eric Blake <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.patches
Organization Red Hat, Inc.
Message-ID <[email protected]>
On 09/29/2014 04:44 PM, Zack Weinberg wrote:
> On Sat, Sep 27, 2014 at 8:26 PM, Eric Blake <[email protected]> wrote:
>> There has been a LOT of news about bash's Shell Shock bug lately.
>> Document some of the ramifications it has on portable scripting.
> 
> I think this is a good idea in the abstract, but I think it's maybe a
> little too specific to this particular incident.  Can I suggest
> instead
> 
> +Posix requires @command{export} to work with any arbitrary value for the
> +contents of the variable being exported.  However, some shells have extensions
> +that involve interpreting some values specially.  We currently know of only one
> +case: all versions of Bash released prior to 27 September 2014 interpret
> +an environment variable whose value begins with @code{() @{} as a shell
> +function definition.  (This is the ``Shellshock'' bug, CVE-2014-6271; it was
> +possible to exploit the parser and cause code to execute immediately upon
> +shell startup.  Newer versions of Bash use special environment variable
> +@emph{names} to implement the same feature.)

Thanks for the suggestions.  I incorporated a lot of this wording, and
also mentioned that there is still an inherent ARG_MAX limitation (you
can't shove infinite data through the environment, although modern Linux
has moved towards no arbitrary limit) and on the issues of not being
able to preserve non-shell-name variables created by env when passing
through certain shells.  The result is finally pushed.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc (application/pgp-signature, 539 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg

iQEcBAEBCAAGBQJUVx7wAAoJEKeha0olJ0Nq+6UH/RkOst5gW5PnhUwWn5mmAHdq
UIHzfcl04IAUm/JEyr11XRomlNREOhM9r7oSbeemhXnVC4Ft/tM1M657yPpfoXG9
uMjIgCXpJIcjqZGzci9XQGm5TghxtShaPlCdkgnlko8ZTrKqBmg5wsHInmeA9/tL
JPzyM3q4VQO/lRReOIAFPx4c4+noYjWIpCfZGbrzin0b1g6Jq//fdD2ZxEkGSqZv
jboqIR9HzzNJ0Z25oqBpmYlXiLwgQ5sj0+k14dOLDjl8E9cBzysYPn2rgMccSy8f
CCDFEKLRbLcxVNTg1SI4PG9pETw5erMi1fxqSwt8++xfMvr08uhIKpiLEJj3rgI=
=z0z6
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.