Could someone help me with writing polkit rule?

Peter Lemenkov lemenkov at gmail.com
Fri Oct 25 09:22:18 UTC 2013


Hello All!

I 'm trying to write a polkit rule which allows every member of a
particular group ("ejabberd") to run a specific script
("/sbin/ejabberdctl" or "/usr/sbin/ejabberdctl"). Other users should
not be even able to run it. This sounds simple, so I quickly wrote
this:

http://peter.fedorapeople.org/stuff/ejabberdctl.polkit.rules

I installed it to %{_datadir}/polkit-1/rules.d/51-ejabberdctl.rules,
and added /usr/bin/ejabberdctl which contains just the following:

=======
#!/bin/sh
/usr/bin/pkexec /usr/sbin/ejabberdctl "$@"
=======

So when user types ejabberdctl it actually runs /usr/sbin/ejabberdctl
under the polkit supervision. Unfortunately people started reporting
about the issues with the other apps:

* https://bugzilla.redhat.com/show_bug.cgi?id=1009408

I can't find what's wrong with the rule above so I'm calling you for
help. Could please someone help me fixing this mess?
-- 
With best regards, Peter Lemenkov.


More information about the devel mailing list