[systemd-devel] [PATCH] fileio: quote more shell characters in envfiles

2014-07-13 Thread Mantas Mikulėnas
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 | 4 ++-- src/shared/util.h |

Re: [systemd-devel] [PATCH] fileio: quote more shell characters in envfiles

2014-07-13 Thread Zbigniew Jędrzejewski-Szmek
On Sun, Jul 13, 2014 at 06:49:00PM +0300, Mantas Mikulėnas wrote: 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