diff options
author | Colin Guthrie <colin@mageia.org> | 2013-11-16 12:27:15 +0100 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2013-11-17 11:17:14 +0000 |
commit | c3035afbe00bdfe90069c62efd8de8fad0297c7b (patch) | |
tree | 50d99a2881c430b2e02935563c7ed6975606e2ed /polkit | |
parent | 3f99c470e7bb5e9a9eaaaf4e5c159752111dc51d (diff) | |
download | control-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/Makefile | 2 |
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 |