X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fspawn-polkit-agent.c;h=7dae4d14fe22648a64fcfb3f3ef2fdd84cc0b135;hb=67ace99e48cdf843aa0d1cd80a4e080f5c6eb320;hp=ada4bdb17e284dfcc98e40d4a71bda0a76ae934a;hpb=89fa7ebc93201bef1bda4d8bd9791f0a2eaab112;p=elogind.git diff --git a/src/shared/spawn-polkit-agent.c b/src/shared/spawn-polkit-agent.c index ada4bdb17..7dae4d14f 100644 --- a/src/shared/spawn-polkit-agent.c +++ b/src/shared/spawn-polkit-agent.c @@ -1,5 +1,3 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ - /*** This file is part of systemd. @@ -46,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))