summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2013-11-17 11:22:38 +0000
committerColin Guthrie <colin@mageia.org>2013-11-17 11:22:38 +0000
commit4fd6d66ab671b402ec3f7c818b7c5842e46e188f (patch)
tree9007905a42532a3a7803b1c20fc80d43ce51f3e7
parentc47a4b1cf7adf097a4fc7f2f2191a9f03db9ab44 (diff)
downloaddrakx-net-4fd6d66ab671b402ec3f7c818b7c5842e46e188f.tar
drakx-net-4fd6d66ab671b402ec3f7c818b7c5842e46e188f.tar.gz
drakx-net-4fd6d66ab671b402ec3f7c818b7c5842e46e188f.tar.bz2
drakx-net-4fd6d66ab671b402ec3f7c818b7c5842e46e188f.tar.xz
drakx-net-4fd6d66ab671b402ec3f7c818b7c5842e46e188f.zip
polkit: Only use pkexec when not already root
-rw-r--r--polkit/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/polkit/Makefile b/polkit/Makefile
index 34e8106..dc7c4ba 100644
--- a/polkit/Makefile
+++ b/polkit/Makefile
@@ -13,7 +13,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