core: use runuser instead of sudo for switching root->user
There are problems with using sudo in early system startup (systemd-logind not running yet, pam_systemd timeouts). Since we don't need full session here, runuser is good enough (even better: faster).
This commit is contained in:
parent
2265fd3d52
commit
89d002a031
@ -1830,7 +1830,7 @@ class QubesVm(object):
|
|||||||
# many qrexec services would need to deal with root/user
|
# many qrexec services would need to deal with root/user
|
||||||
# permission problems
|
# permission problems
|
||||||
qubes_group = grp.getgrnam('qubes')
|
qubes_group = grp.getgrnam('qubes')
|
||||||
qrexec = ['sudo', '-u', qubes_group.gr_mem[0]]
|
qrexec = ['runuser', '-u', qubes_group.gr_mem[0], '--']
|
||||||
|
|
||||||
qrexec += ['env', 'QREXEC_STARTUP_TIMEOUT=' + str(self.qrexec_timeout),
|
qrexec += ['env', 'QREXEC_STARTUP_TIMEOUT=' + str(self.qrexec_timeout),
|
||||||
system_path["qrexec_daemon_path"]]
|
system_path["qrexec_daemon_path"]]
|
||||||
|
Loading…
Reference in New Issue
Block a user