94 lines
5.7 KiB
Plaintext
94 lines
5.7 KiB
Plaintext
$OpenBSD: patch-docs_man_polkit_xml,v 1.1 2012/11/20 14:11:48 ajacoutot Exp $
|
|
--- docs/man/polkit.xml.orig Wed Nov 14 19:22:07 2012
|
|
+++ docs/man/polkit.xml Tue Nov 20 14:23:46 2012
|
|
@@ -103,14 +103,14 @@ System Context | |
|
|
| PolicyKit1 |<---------+
|
|
+------------------+ |
|
|
^ |
|
|
- | +--------------------------------------+
|
|
- | | /usr/share/polkit-1/actions/*.policy |
|
|
- | +--------------------------------------+
|
|
+ | +--------------------------------------------+
|
|
+ | | ${PREFIX}/share/polkit-1/actions/*.policy |
|
|
+ | +--------------------------------------------+
|
|
|
|
|
- +--------------------------------------+
|
|
- | /etc/polkit-1/rules.d/*.rules |
|
|
- | /usr/share/polkit-1/rules.d/*.rules |
|
|
- +--------------------------------------+
|
|
+ +--------------------------------------------+
|
|
+ | ${SYSCONFDIR}/polkit-1/rules.d/*.rules |
|
|
+ | ${PREFIX}/share/polkit-1/rules.d/*.rules |
|
|
+ +--------------------------------------------+
|
|
]]></programlisting>
|
|
</textobject>
|
|
</mediaobject>
|
|
@@ -217,7 +217,7 @@ System Context | |
|
|
order to use polkit. Actions correspond to operations that
|
|
clients can request the mechanism to carry out and are defined
|
|
in XML files that the mechanism installs into the <filename
|
|
- class='directory'>/usr/share/polkit-1/actions</filename>
|
|
+ class='directory'>${PREFIX}/share/polkit-1/actions</filename>
|
|
directory.
|
|
</para>
|
|
|
|
@@ -469,21 +469,21 @@ System Context | |
|
|
<para>
|
|
<command>polkitd</command> reads
|
|
<filename class='extension'>.rules</filename> files from the
|
|
- <filename class='directory'>/etc/polkit-1/rules.d</filename> and
|
|
- <filename class='directory'>/usr/share/polkit-1/rules.d</filename>
|
|
+ <filename class='directory'>${SYSCONFDIR}/polkit-1/rules.d</filename> and
|
|
+ <filename class='directory'>${PREFIX}/share/polkit-1/rules.d</filename>
|
|
directories by sorting the files in lexical order based on the
|
|
basename on each file (if there's a tie, files in
|
|
- <filename class='directory'>/etc</filename>
|
|
+ <filename class='directory'>${SYSCONFDIR}</filename>
|
|
are processed before files in
|
|
- <filename class='directory'>/usr</filename>).
|
|
+ <filename class='directory'>${PREFIX}</filename>).
|
|
For example, for the following four
|
|
files, the order is
|
|
</para>
|
|
<itemizedlist mark='opencircle' spacing='compact'>
|
|
- <listitem><para><filename>/etc/polkit-1/rules.d/10-auth.rules</filename></para></listitem>
|
|
- <listitem><para><filename>/usr/share/polkit-1/rules.d/10-auth.rules</filename></para></listitem>
|
|
- <listitem><para><filename>/etc/polkit-1/rules.d/15-auth.rules</filename></para></listitem>
|
|
- <listitem><para><filename>/usr/share/polkit-1/rules.d/20-auth.rules</filename></para></listitem>
|
|
+ <listitem><para><filename>${SYSCONFDIR}/polkit-1/rules.d/10-auth.rules</filename></para></listitem>
|
|
+ <listitem><para><filename>${PREFIX}/share/polkit-1/rules.d/10-auth.rules</filename></para></listitem>
|
|
+ <listitem><para><filename>${SYSCONFDIR}/polkit-1/rules.d/15-auth.rules</filename></para></listitem>
|
|
+ <listitem><para><filename>${PREFIX}/share/polkit-1/rules.d/20-auth.rules</filename></para></listitem>
|
|
</itemizedlist>
|
|
<para>
|
|
Both directories are monitored so if a rules file is changed,
|
|
@@ -563,7 +563,7 @@ System Context | |
|
|
called in the order they have been added until one of the
|
|
functions returns a value. Hence, to add an authorization rule
|
|
that is processed before other rules, put it in a file in
|
|
- <filename class='directory'>/etc/polkit-1/rules.d</filename>
|
|
+ <filename class='directory'>${SYSCONFDIR}/polkit-1/rules.d</filename>
|
|
with a name that sorts before other rules files, for example
|
|
<filename>00-early-checks.rules</filename>. Each function should
|
|
return a value from <literal>polkit.Result</literal>
|
|
@@ -679,8 +679,8 @@ polkit.addRule(function(action, subject) {
|
|
will produce the following when the user runs 'pkexec -u bateman bash -i' from a shell:
|
|
</para>
|
|
<programlisting><![CDATA[
|
|
-May 24 14:28:50 thinkpad polkitd[32217]: /etc/polkit-1/rules.d/10-test.rules:3: action=[Action id='org.freedesktop.policykit.exec' command_line='/usr/bin/bash -i' program='/usr/bin/bash' user='bateman' user.gecos='Patrick Bateman' user.display='Patrick Bateman (bateman)']
|
|
-May 24 14:28:50 thinkpad polkitd[32217]: /etc/polkit-1/rules.d/10-test.rules:4: subject=[Subject pid=1352 user='davidz' groups=davidz,wheel, seat='seat0' session='1' local=true active=true]
|
|
+May 24 14:28:50 thinkpad polkitd[32217]: ${SYSCONFDIR}/polkit-1/rules.d/10-test.rules:3: action=[Action id='org.freedesktop.policykit.exec' command_line='/bin/ksh -i' program='/bin/ksh' user='bateman' user.gecos='Patrick Bateman' user.display='Patrick Bateman (bateman)']
|
|
+May 24 14:28:50 thinkpad polkitd[32217]: ${SYSCONFDIR}/polkit-1/rules.d/10-test.rules:4: subject=[Subject pid=1352 user='davidz' groups=davidz,wheel, seat='seat0' session='1' local=true active=true]
|
|
]]></programlisting>
|
|
|
|
</refsect2>
|
|
@@ -912,7 +912,7 @@ polkit.addRule(function(action, subject) {
|
|
<programlisting><![CDATA[
|
|
polkit.addRule(function(action, subject) {
|
|
if (action.id == "org.freedesktop.policykit.exec" &&
|
|
- action.lookup("program") == "/usr/bin/cat") {
|
|
+ action.lookup("program") == "/bin/cat") {
|
|
return polkit.Result.AUTH_SELF;
|
|
}
|
|
});
|