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

Closes: #637
Approved by: cgwalters
This commit is contained in:
Paul van Tilburg authored and Atomic Bot committed 2016-12-23 12:18:27 +00:00
1 parent 300752e55a
commit 4d0b9be175
1 file changed
+1 -1
+1 -1
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;