ACC SHELL

Path : /usr/share/gtk-doc/html/polkit/
File Upload :
Current File : //usr/share/gtk-doc/html/polkit/polkit-Configuration.html

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Configuration</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="PolicyKit Library Reference Manual">
<link rel="up" href="ref-core.html" title="Core API Reference">
<link rel="prev" href="polkit-Context.html" title="Context">
<link rel="next" href="polkit-Policy-Definition-Files.html" title="Policy Definition Files">
<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="polkit-Context.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ref-core.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">PolicyKit Library Reference Manual</th>
<td><a accesskey="n" href="polkit-Policy-Definition-Files.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#polkit-Configuration.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#polkit-Configuration.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" title="Configuration">
<a name="polkit-Configuration"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="polkit-Configuration.top_of_page"></a>Configuration</span></h2>
<p>Configuration — Represents the system-wide <code class="literal">/etc/PolicyKit/PolicyKit.conf</code> file.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="polkit-Configuration.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">                    <a class="link" href="polkit-Configuration.html#PolKitConfig" title="PolKitConfig">PolKitConfig</a>;
<a class="link" href="polkit-Configuration.html#PolKitConfig" title="PolKitConfig"><span class="returnvalue">PolKitConfig</span></a> *      <a class="link" href="polkit-Configuration.html#polkit-config-new" title="polkit_config_new ()">polkit_config_new</a>                   (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
                                                         <em class="parameter"><code><a class="link" href="polkit-Error-reporting.html#PolKitError" title="PolKitError"><span class="type">PolKitError</span></a> **error</code></em>);
<a class="link" href="polkit-Configuration.html#PolKitConfig" title="PolKitConfig"><span class="returnvalue">PolKitConfig</span></a> *      <a class="link" href="polkit-Configuration.html#polkit-config-ref" title="polkit_config_ref ()">polkit_config_ref</a>                   (<em class="parameter"><code><a class="link" href="polkit-Configuration.html#PolKitConfig" title="PolKitConfig"><span class="type">PolKitConfig</span></a> *pk_config</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="polkit-Configuration.html#polkit-config-unref" title="polkit_config_unref ()">polkit_config_unref</a>                 (<em class="parameter"><code><a class="link" href="polkit-Configuration.html#PolKitConfig" title="PolKitConfig"><span class="type">PolKitConfig</span></a> *pk_config</code></em>);
<a class="link" href="polkit-Results.html#PolKitResult" title="enum PolKitResult"><span class="returnvalue">PolKitResult</span></a>        <a class="link" href="polkit-Configuration.html#polkit-config-can-session-do-action" title="polkit_config_can_session_do_action ()">polkit_config_can_session_do_action</a> (<em class="parameter"><code><a class="link" href="polkit-Configuration.html#PolKitConfig" title="PolKitConfig"><span class="type">PolKitConfig</span></a> *pk_config</code></em>,
                                                         <em class="parameter"><code><a class="link" href="polkit-Actions.html#PolKitAction" title="PolKitAction"><span class="type">PolKitAction</span></a> *action</code></em>,
                                                         <em class="parameter"><code><a class="link" href="polkit-Session.html#PolKitSession" title="PolKitSession"><span class="type">PolKitSession</span></a> *session</code></em>);
<a class="link" href="polkit-Results.html#PolKitResult" title="enum PolKitResult"><span class="returnvalue">PolKitResult</span></a>        <a class="link" href="polkit-Configuration.html#polkit-config-can-caller-do-action" title="polkit_config_can_caller_do_action ()">polkit_config_can_caller_do_action</a>  (<em class="parameter"><code><a class="link" href="polkit-Configuration.html#PolKitConfig" title="PolKitConfig"><span class="type">PolKitConfig</span></a> *pk_config</code></em>,
                                                         <em class="parameter"><code><a class="link" href="polkit-Actions.html#PolKitAction" title="PolKitAction"><span class="type">PolKitAction</span></a> *action</code></em>,
                                                         <em class="parameter"><code><a class="link" href="polkit-Caller.html#PolKitCaller" title="PolKitCaller"><span class="type">PolKitCaller</span></a> *caller</code></em>);
enum                <a class="link" href="polkit-Configuration.html#PolKitConfigAdminAuthType" title="enum PolKitConfigAdminAuthType">PolKitConfigAdminAuthType</a>;
<a class="link" href="polkit-Basic-types.html#polkit-bool-t" title="polkit_bool_t"><span class="returnvalue">polkit_bool_t</span></a>       <a class="link" href="polkit-Configuration.html#polkit-config-determine-admin-auth-type" title="polkit_config_determine_admin_auth_type ()">polkit_config_determine_admin_auth_type</a>
                                                        (<em class="parameter"><code><a class="link" href="polkit-Configuration.html#PolKitConfig" title="PolKitConfig"><span class="type">PolKitConfig</span></a> *pk_config</code></em>,
                                                         <em class="parameter"><code><a class="link" href="polkit-Actions.html#PolKitAction" title="PolKitAction"><span class="type">PolKitAction</span></a> *action</code></em>,
                                                         <em class="parameter"><code><a class="link" href="polkit-Caller.html#PolKitCaller" title="PolKitCaller"><span class="type">PolKitCaller</span></a> *caller</code></em>,
                                                         <em class="parameter"><code><a class="link" href="polkit-Configuration.html#PolKitConfigAdminAuthType" title="enum PolKitConfigAdminAuthType"><span class="type">PolKitConfigAdminAuthType</span></a> *out_admin_auth_type</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> **out_data</code></em>);
</pre>
</div>
<div class="refsect1" title="Description">
<a name="polkit-Configuration.description"></a><h2>Description</h2>
<p>
This class is used to represent the /etc/PolicyKit/PolicyKit.conf
configuration file. Applications using PolicyKit should never use
this class; it's only here for integration with other PolicyKit
components.
</p>
</div>
<div class="refsect1" title="Details">
<a name="polkit-Configuration.details"></a><h2>Details</h2>
<div class="refsect2" title="PolKitConfig">
<a name="PolKitConfig"></a><h3>PolKitConfig</h3>
<pre class="programlisting">typedef struct _PolKitConfig PolKitConfig;</pre>
<p>
This class represents the system-wide configuration file for
PolicyKit. Applications using PolicyKit should never use this
class; it's only here for integration with other PolicyKit
components.
</p>
</div>
<hr>
<div class="refsect2" title="polkit_config_new ()">
<a name="polkit-config-new"></a><h3>polkit_config_new ()</h3>
<pre class="programlisting"><a class="link" href="polkit-Configuration.html#PolKitConfig" title="PolKitConfig"><span class="returnvalue">PolKitConfig</span></a> *      polkit_config_new                   (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
                                                         <em class="parameter"><code><a class="link" href="polkit-Error-reporting.html#PolKitError" title="PolKitError"><span class="type">PolKitError</span></a> **error</code></em>);</pre>
<p>
Load and parse a PolicyKit configuration file.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>Path to configuration, typically /etc/PolicyKit/PolicyKit.conf is passed.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for error
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the configuration file object
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="polkit_config_ref ()">
<a name="polkit-config-ref"></a><h3>polkit_config_ref ()</h3>
<pre class="programlisting"><a class="link" href="polkit-Configuration.html#PolKitConfig" title="PolKitConfig"><span class="returnvalue">PolKitConfig</span></a> *      polkit_config_ref                   (<em class="parameter"><code><a class="link" href="polkit-Configuration.html#PolKitConfig" title="PolKitConfig"><span class="type">PolKitConfig</span></a> *pk_config</code></em>);</pre>
<p>
Increase reference count.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pk_config</code></em> :</span></p></td>
<td>the object
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the object
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="polkit_config_unref ()">
<a name="polkit-config-unref"></a><h3>polkit_config_unref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                polkit_config_unref                 (<em class="parameter"><code><a class="link" href="polkit-Configuration.html#PolKitConfig" title="PolKitConfig"><span class="type">PolKitConfig</span></a> *pk_config</code></em>);</pre>
<p>
Decreases the reference count of the object. If it becomes zero,
the object is freed. Before freeing, reference counts on embedded
objects are decresed by one.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>pk_config</code></em> :</span></p></td>
<td>the object
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="polkit_config_can_session_do_action ()">
<a name="polkit-config-can-session-do-action"></a><h3>polkit_config_can_session_do_action ()</h3>
<pre class="programlisting"><a class="link" href="polkit-Results.html#PolKitResult" title="enum PolKitResult"><span class="returnvalue">PolKitResult</span></a>        polkit_config_can_session_do_action (<em class="parameter"><code><a class="link" href="polkit-Configuration.html#PolKitConfig" title="PolKitConfig"><span class="type">PolKitConfig</span></a> *pk_config</code></em>,
                                                         <em class="parameter"><code><a class="link" href="polkit-Actions.html#PolKitAction" title="PolKitAction"><span class="type">PolKitAction</span></a> *action</code></em>,
                                                         <em class="parameter"><code><a class="link" href="polkit-Session.html#PolKitSession" title="PolKitSession"><span class="type">PolKitSession</span></a> *session</code></em>);</pre>
<p>
Determine if the /etc/PolicyKit/PolicyKit.conf configuration file
says that a given session can do a given action.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pk_config</code></em> :</span></p></td>
<td>the PolicyKit context
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td>
<td>the type of access to check for
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>the session in question
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A <a class="link" href="polkit-Results.html#PolKitResult" title="enum PolKitResult"><span class="type">PolKitResult</span></a> - returns <a class="link" href="polkit-Results.html#POLKIT-RESULT-UNKNOWN:CAPS"><span class="type">POLKIT_RESULT_UNKNOWN</span></a> if there
was no match in the configuration file.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="polkit_config_can_caller_do_action ()">
<a name="polkit-config-can-caller-do-action"></a><h3>polkit_config_can_caller_do_action ()</h3>
<pre class="programlisting"><a class="link" href="polkit-Results.html#PolKitResult" title="enum PolKitResult"><span class="returnvalue">PolKitResult</span></a>        polkit_config_can_caller_do_action  (<em class="parameter"><code><a class="link" href="polkit-Configuration.html#PolKitConfig" title="PolKitConfig"><span class="type">PolKitConfig</span></a> *pk_config</code></em>,
                                                         <em class="parameter"><code><a class="link" href="polkit-Actions.html#PolKitAction" title="PolKitAction"><span class="type">PolKitAction</span></a> *action</code></em>,
                                                         <em class="parameter"><code><a class="link" href="polkit-Caller.html#PolKitCaller" title="PolKitCaller"><span class="type">PolKitCaller</span></a> *caller</code></em>);</pre>
<p>
Determine if the /etc/PolicyKit/PolicyKit.conf configuration file
says that a given caller can do a given action.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pk_config</code></em> :</span></p></td>
<td>the PolicyKit context
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td>
<td>the type of access to check for
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>caller</code></em> :</span></p></td>
<td>the caller in question
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A <a class="link" href="polkit-Results.html#PolKitResult" title="enum PolKitResult"><span class="type">PolKitResult</span></a> - returns <a class="link" href="polkit-Results.html#POLKIT-RESULT-UNKNOWN:CAPS"><span class="type">POLKIT_RESULT_UNKNOWN</span></a> if there
was no match in the configuration file.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="enum PolKitConfigAdminAuthType">
<a name="PolKitConfigAdminAuthType"></a><h3>enum PolKitConfigAdminAuthType</h3>
<pre class="programlisting">typedef enum
{
        POLKIT_CONFIG_ADMIN_AUTH_TYPE_USER,
        POLKIT_CONFIG_ADMIN_AUTH_TYPE_GROUP
} PolKitConfigAdminAuthType;
</pre>
<p>
This enumeration reflects results defined in the
"define_admin_auth" configuration element.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="POLKIT-CONFIG-ADMIN-AUTH-TYPE-USER:CAPS"></a><span class="term"><code class="literal">POLKIT_CONFIG_ADMIN_AUTH_TYPE_USER</code></span></p></td>
<td>Authentication as
administrator matches one or more users
</td>
</tr>
<tr>
<td><p><a name="POLKIT-CONFIG-ADMIN-AUTH-TYPE-GROUP:CAPS"></a><span class="term"><code class="literal">POLKIT_CONFIG_ADMIN_AUTH_TYPE_GROUP</code></span></p></td>
<td>Authentication as
administrator matches users from one or more groups
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="polkit_config_determine_admin_auth_type ()">
<a name="polkit-config-determine-admin-auth-type"></a><h3>polkit_config_determine_admin_auth_type ()</h3>
<pre class="programlisting"><a class="link" href="polkit-Basic-types.html#polkit-bool-t" title="polkit_bool_t"><span class="returnvalue">polkit_bool_t</span></a>       polkit_config_determine_admin_auth_type
                                                        (<em class="parameter"><code><a class="link" href="polkit-Configuration.html#PolKitConfig" title="PolKitConfig"><span class="type">PolKitConfig</span></a> *pk_config</code></em>,
                                                         <em class="parameter"><code><a class="link" href="polkit-Actions.html#PolKitAction" title="PolKitAction"><span class="type">PolKitAction</span></a> *action</code></em>,
                                                         <em class="parameter"><code><a class="link" href="polkit-Caller.html#PolKitCaller" title="PolKitCaller"><span class="type">PolKitCaller</span></a> *caller</code></em>,
                                                         <em class="parameter"><code><a class="link" href="polkit-Configuration.html#PolKitConfigAdminAuthType" title="enum PolKitConfigAdminAuthType"><span class="type">PolKitConfigAdminAuthType</span></a> *out_admin_auth_type</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> **out_data</code></em>);</pre>
<p>
Determine what "Authenticate as admin" means for a given caller and
a given action. This basically returns the result of the
"define_admin_auth" in the configuration file when drilling down
for a specific caller / action.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pk_config</code></em> :</span></p></td>
<td>the PolicyKit context
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td>
<td>the type of access to check for
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>caller</code></em> :</span></p></td>
<td>the caller in question
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out_admin_auth_type</code></em> :</span></p></td>
<td>return location for the authentication type
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out_data</code></em> :</span></p></td>
<td>return location for the match value of the given
authentication type. Caller shall not manipulate or free this
string.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> TRUE if value was returned
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.14</div>
</body>
</html>

ACC SHELL 2018