mirror of
https://github.com/systemd/systemd.git
synced 2024-12-26 03:22:00 +03:00
Merge pull request #2965 from martinpitt/systemctl-polkit
systemctl: don't start polkit agent when running as root
This commit is contained in:
commit
050d7e1998
@ -44,6 +44,10 @@ int polkit_agent_open(void) {
|
||||
if (agent_pid > 0)
|
||||
return 0;
|
||||
|
||||
/* Clients that run as root don't need to activate/query polkit */
|
||||
if (geteuid() == 0)
|
||||
return 0;
|
||||
|
||||
/* We check STDIN here, not STDOUT, since this is about input,
|
||||
* not output */
|
||||
if (!isatty(STDIN_FILENO))
|
||||
|
Loading…
Reference in New Issue
Block a user