admin: Use execlp() to look for systemctl as the shell would

Closes: #637
Approved by: cgwalters
This commit is contained in:
Paul van Tilburg 2016-12-21 15:39:45 +00:00 committed by Atomic Bot
parent 300752e55a
commit 4d0b9be175

View File

@ -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;