diff options
Diffstat (limited to 'src/shared/spawn-polkit-agent.c')
-rw-r--r-- | src/shared/spawn-polkit-agent.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/spawn-polkit-agent.c b/src/shared/spawn-polkit-agent.c index 886248b9f9..3c93c79ceb 100644 --- a/src/shared/spawn-polkit-agent.c +++ b/src/shared/spawn-polkit-agent.c @@ -52,6 +52,9 @@ int polkit_agent_open(void) { if (!isatty(STDIN_FILENO)) return 0; + if (!is_main_thread()) + return -EPERM; + if (pipe2(pipe_fd, 0) < 0) return -errno; |