admin: Use execlp() to look for systemctl as the shell would
Closes: #637 Approved by: cgwalters
This commit is contained in:
1 parent
300752e55a
commit
4d0b9be175
1 file changed
+1
-1
@@ -164,7 +164,7 @@ ot_admin_execve_reboot (OstreeSysroot *sysroot, GError **error)
|
|||||||
|
|
||||||
if (g_file_equal (ostree_sysroot_get_path (sysroot), real_sysroot))
|
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);
|
glnx_set_error_from_errno (error);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|||||||
Reference in new issue
Block a user