chiark / gitweb /
fileio: quote more shell characters in envfiles
authorMantas Mikulėnas <grawity@gmail.com>
Sun, 13 Jul 2014 15:49:00 +0000 (18:49 +0300)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 14 Jul 2014 02:50:24 +0000 (22:50 -0400)
commit0ce5a80601597fe4d1a715a8f70ce8d5ccaa2d86
tree5f16e4a27e78e170170de36486d339f9eb8be3fe
parent667a1cd645c9402921dedff08a86bb35cddbcbf9
fileio: quote more shell characters in envfiles

Turns out, making strings shell-proof is harder than expected:

    # machinectl set-hostname "foo|poweroff" && . /etc/machine-info

(This could be simplified by quoting *and* escaping all characters,
which is harmless in shell but unnecessary.)
src/shared/fileio.c
src/shared/util.h