From: Paul van Tilburg Date: Wed, 21 Dec 2016 15:39:45 +0000 (+0000) Subject: admin: Use execlp() to look for systemctl as the shell would X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~41^2~22 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4d0b9be17553ed6bd59b89ab260fbd95d17588cf;p=ostree.git admin: Use execlp() to look for systemctl as the shell would Closes: #637 Approved by: cgwalters --- diff --git a/src/ostree/ot-admin-functions.c b/src/ostree/ot-admin-functions.c index ed4dfdfb..7ba2207e 100644 --- a/src/ostree/ot-admin-functions.c +++ b/src/ostree/ot-admin-functions.c @@ -164,7 +164,7 @@ ot_admin_execve_reboot (OstreeSysroot *sysroot, GError **error) if (g_file_equal (ostree_sysroot_get_path (sysroot), real_sysroot)) { - if (execl ("systemctl", "systemctl", "reboot", NULL) < 0) + if (execlp ("systemctl", "systemctl", "reboot", NULL) < 0) { glnx_set_error_from_errno (error); return FALSE;