summaryrefslogtreecommitdiffstats
path: root/polkit
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2013-11-16 12:27:15 +0100
committerColin Guthrie <colin@mageia.org>2013-11-17 11:17:14 +0000
commitc3035afbe00bdfe90069c62efd8de8fad0297c7b (patch)
tree50d99a2881c430b2e02935563c7ed6975606e2ed /polkit
parent3f99c470e7bb5e9a9eaaaf4e5c159752111dc51d (diff)
downloadcontrol-center-c3035afbe00bdfe90069c62efd8de8fad0297c7b.tar
control-center-c3035afbe00bdfe90069c62efd8de8fad0297c7b.tar.gz
control-center-c3035afbe00bdfe90069c62efd8de8fad0297c7b.tar.bz2
control-center-c3035afbe00bdfe90069c62efd8de8fad0297c7b.tar.xz
control-center-c3035afbe00bdfe90069c62efd8de8fad0297c7b.zip
polkit: Only use pkexec when not already root
Diffstat (limited to 'polkit')
-rw-r--r--polkit/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/polkit/Makefile b/polkit/Makefile
index 4c379cd8..b577f9e7 100644
--- a/polkit/Makefile
+++ b/polkit/Makefile
@@ -15,7 +15,7 @@ clean:
rm -f $(WRAPPERS) $(POLICY)
%: org.mageia.%.policy.in
- @echo -e "#!/bin/sh\nexec $(BINDIR)/pkexec $(LIBEXECDIR)/$@ $$""*" > $@
+ @echo -e '#!/bin/sh\nif [[ "$$UID" != "0" ]] ; then\n exec $(BINDIR)/pkexec $(LIBEXECDIR)/$@ "$$''@"\nelse\n exec $(LIBEXECDIR)/$@ "$$''@"\nfi\n' > $@
%.policy: %.policy.in
intltool-merge --utf8 ../po $< $@ -x -u -c ../po/.intltool-merge-cache