From 4d0b9be17553ed6bd59b89ab260fbd95d17588cf Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Wed, 21 Dec 2016 15:39:45 +0000 Subject: [PATCH] admin: Use execlp() to look for systemctl as the shell would Closes: #637 Approved by: cgwalters --- src/ostree/ot-admin-functions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;