[systemd-devel] systemctl show environment quoting

Alexandre Detiste alexandre.detiste at gmail.com
Wed Oct 29 01:40:19 PDT 2014


Hi,

I stumbled on this:

$ systemctl cat cron-crontab-pi-0 | grep Environment
Environment="A=a a" "MAILTO=system-cron at mailinator.com" "B=b b" "C=c c"
$ systemctl show cron-crontab-pi-0 -p Environment
Environment=A=a a MAILTO=system-cron at mailinator.com B=b b C=c c

-> the quotes are gone.

Is this done by design, or a bug in "systemctl show" ?

My simple parser could be abused if someone hid a MAILTO= inside an other env variable.
https://github.com/systemd-cron/systemd-cron/blob/master/src/bin/mail_on_failure

Here this won't hurt, but this may causes security problems elsewhere.

Alexandre Detiste


More information about the systemd-devel mailing list