1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>GSignondSecurityContext</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="gsignond API Reference Manual">
8 <link rel="up" href="ch05.html" title="GSignond API for writing platform adaptation extensions">
9 <link rel="prev" href="GSignondAccessControlManager.html" title="GSignondAccessControlManager">
10 <link rel="next" href="GSignondStorageManager.html" title="GSignondStorageManager">
11 <meta name="generator" content="GTK-Doc V1.19.1 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
16 <td width="100%" align="left">
17 <a href="#" class="shortcut">Top</a>
19 <a href="#gsignond-GSignondSecurityContext.description" class="shortcut">Description</a>
21 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
22 <td><a accesskey="u" href="ch05.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
23 <td><a accesskey="p" href="GSignondAccessControlManager.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
24 <td><a accesskey="n" href="GSignondStorageManager.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
26 <div class="refentry">
27 <a name="gsignond-GSignondSecurityContext"></a><div class="titlepage"></div>
28 <div class="refnamediv"><table width="100%"><tr>
30 <h2><span class="refentrytitle"><a name="gsignond-GSignondSecurityContext.top_of_page"></a>GSignondSecurityContext</span></h2>
31 <p>GSignondSecurityContext — security context descriptor used in access control checks</p>
33 <td valign="top" align="right"></td>
35 <div class="refsynopsisdiv">
36 <a name="gsignond-GSignondSecurityContext.synopsis"></a><h2>Synopsis</h2>
37 <pre class="synopsis">
38 #include <gsignond/gsignond-security-context.h>
40 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext">GSignondSecurityContext</a>;
41 typedef <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList">GSignondSecurityContextList</a>;
42 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-check" title="gsignond_security_context_check ()">gsignond_security_context_check</a> (<em class="parameter"><code>const <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *reference</code></em>,
43 <em class="parameter"><code>const <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *test</code></em>);
44 <span class="returnvalue">int</span> <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-compare" title="gsignond_security_context_compare ()">gsignond_security_context_compare</a> (<em class="parameter"><code>const <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *ctx1</code></em>,
45 <em class="parameter"><code>const <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *ctx2</code></em>);
46 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="returnvalue">GSignondSecurityContext</span></a> * <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-copy" title="gsignond_security_context_copy ()">gsignond_security_context_copy</a>
47 (<em class="parameter"><code>const <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *src_ctx</code></em>);
48 <span class="returnvalue">void</span> <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-free" title="gsignond_security_context_free ()">gsignond_security_context_free</a> (<em class="parameter"><code><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *ctx</code></em>);
49 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="returnvalue">GSignondSecurityContext</span></a> * <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-from-variant" title="gsignond_security_context_from_variant ()">gsignond_security_context_from_variant</a>
50 (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *variant</code></em>);
51 const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-get-application-context" title="gsignond_security_context_get_application_context ()">gsignond_security_context_get_application_context</a>
52 (<em class="parameter"><code>const <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *ctx</code></em>);
53 const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-get-system-context" title="gsignond_security_context_get_system_context ()">gsignond_security_context_get_system_context</a>
54 (<em class="parameter"><code>const <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *ctx</code></em>);
55 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="returnvalue">GSignondSecurityContextList</span></a> * <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-list-copy" title="gsignond_security_context_list_copy ()">gsignond_security_context_list_copy</a>
56 (<em class="parameter"><code>const <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="type">GSignondSecurityContextList</span></a> *src_list</code></em>);
57 <span class="returnvalue">void</span> <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-list-free" title="gsignond_security_context_list_free ()">gsignond_security_context_list_free</a> (<em class="parameter"><code><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="type">GSignondSecurityContextList</span></a> *seclist</code></em>);
58 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="returnvalue">GSignondSecurityContextList</span></a> * <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-list-from-variant" title="gsignond_security_context_list_from_variant ()">gsignond_security_context_list_from_variant</a>
59 (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *variant</code></em>);
60 <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-list-to-variant" title="gsignond_security_context_list_to_variant ()">gsignond_security_context_list_to_variant</a>
61 (<em class="parameter"><code>const <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="type">GSignondSecurityContextList</span></a> *list</code></em>);
62 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-match" title="gsignond_security_context_match ()">gsignond_security_context_match</a> (<em class="parameter"><code>const <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *ctx1</code></em>,
63 <em class="parameter"><code>const <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *ctx2</code></em>);
64 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="returnvalue">GSignondSecurityContext</span></a> * <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-new" title="gsignond_security_context_new ()">gsignond_security_context_new</a> ();
65 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="returnvalue">GSignondSecurityContext</span></a> * <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-new-from-values" title="gsignond_security_context_new_from_values ()">gsignond_security_context_new_from_values</a>
66 (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *system_context</code></em>,
67 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *application_context</code></em>);
68 <span class="returnvalue">void</span> <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-set-application-context" title="gsignond_security_context_set_application_context ()">gsignond_security_context_set_application_context</a>
69 (<em class="parameter"><code><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *ctx</code></em>,
70 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *application_context</code></em>);
71 <span class="returnvalue">void</span> <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-set-system-context" title="gsignond_security_context_set_system_context ()">gsignond_security_context_set_system_context</a>
72 (<em class="parameter"><code><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *ctx</code></em>,
73 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *system_context</code></em>);
74 <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-to-variant" title="gsignond_security_context_to_variant ()">gsignond_security_context_to_variant</a>
75 (<em class="parameter"><code>const <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *ctx</code></em>);
78 <div class="refsect1">
79 <a name="gsignond-GSignondSecurityContext.description"></a><h2>Description</h2>
81 Security context is a string tuple of system context and application context.
84 System context can be a binary path, SMACK-label, or MSSF token.
87 Application context identifies a script or a webpage within an application,
88 and it's used for providing access control to runtime environments (when making an access
89 control decision requires not only a binary identifier, but also information
90 about what the binary is doing).
93 When an application is trying to access the gSSO service, the system context
94 is determined by a specific <a class="link" href="GSignondAccessControlManager.html" title="GSignondAccessControlManager"><span class="type">GSignondAccessControlManager</span></a> instance using
95 system services of a specific platform. Application context is set by the
96 application itself. Then both contexts are used by <a class="link" href="GSignondAccessControlManager.html" title="GSignondAccessControlManager"><span class="type">GSignondAccessControlManager</span></a>
97 to perform an access control check.
100 <div class="refsect1">
101 <a name="gsignond-GSignondSecurityContext.details"></a><h2>Details</h2>
102 <div class="refsect2">
103 <a name="GSignondSecurityContext"></a><h3>GSignondSecurityContext</h3>
104 <pre class="programlisting">typedef struct {
107 } GSignondSecurityContext;
110 Security context descriptor used for access control checks. System context
111 and application context can contain a wildcard match "*" which has special
112 meaning in <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-match" title="gsignond_security_context_match ()"><code class="function">gsignond_security_context_match()</code></a> and
113 <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-check" title="gsignond_security_context_check ()"><code class="function">gsignond_security_context_check()</code></a>.
115 <div class="variablelist"><table border="0">
116 <col align="left" valign="top">
119 <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GSignondSecurityContext.sys-ctx"></a>sys_ctx</code></em>;</span></p></td>
120 <td>system context</td>
123 <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GSignondSecurityContext.app-ctx"></a>app_ctx</code></em>;</span></p></td>
124 <td>application context</td>
130 <div class="refsect2">
131 <a name="GSignondSecurityContextList"></a><h3>GSignondSecurityContextList</h3>
132 <pre class="programlisting">typedef GList GSignondSecurityContextList;
135 GList of <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> items.
139 <div class="refsect2">
140 <a name="gsignond-security-context-check"></a><h3>gsignond_security_context_check ()</h3>
141 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gsignond_security_context_check (<em class="parameter"><code>const <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *reference</code></em>,
142 <em class="parameter"><code>const <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *test</code></em>);</pre>
144 Check if <em class="parameter"><code>test</code></em> is covered by <em class="parameter"><code>reference</code></em>.
146 <div class="variablelist"><table border="0">
147 <col align="left" valign="top">
150 <td><p><span class="term"><em class="parameter"><code>reference</code></em> :</span></p></td>
151 <td>reference security context item to check against.</td>
154 <td><p><span class="term"><em class="parameter"><code>test</code></em> :</span></p></td>
155 <td>security context item to be checked.</td>
158 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
159 <td>TRUE if contexts are equal or the <em class="parameter"><code>reference</code></em> has a wildcard
160 system context, or if system contexts are equal and <em class="parameter"><code>reference</code></em> has a wildcard
161 application context, otherwise FALSE. If either or both contexts are NULL,
162 FALSE is returned.</td>
168 <div class="refsect2">
169 <a name="gsignond-security-context-compare"></a><h3>gsignond_security_context_compare ()</h3>
170 <pre class="programlisting"><span class="returnvalue">int</span> gsignond_security_context_compare (<em class="parameter"><code>const <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *ctx1</code></em>,
171 <em class="parameter"><code>const <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *ctx2</code></em>);</pre>
173 Compare two <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> items in a similar way to <code class="function">strcmp()</code>.
175 <div class="variablelist"><table border="0">
176 <col align="left" valign="top">
179 <td><p><span class="term"><em class="parameter"><code>ctx1</code></em> :</span></p></td>
180 <td>first item to compare.</td>
183 <td><p><span class="term"><em class="parameter"><code>ctx2</code></em> :</span></p></td>
184 <td>second item to compare.</td>
187 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
188 <td>negative if ctx1 < ctx2, 0 if ctx1 == ctx2 and positive if ctx1 > ctx2.</td>
194 <div class="refsect2">
195 <a name="gsignond-security-context-copy"></a><h3>gsignond_security_context_copy ()</h3>
196 <pre class="programlisting"><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="returnvalue">GSignondSecurityContext</span></a> * gsignond_security_context_copy
197 (<em class="parameter"><code>const <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *src_ctx</code></em>);</pre>
199 Copies a security context item.
201 <div class="variablelist"><table border="0">
202 <col align="left" valign="top">
205 <td><p><span class="term"><em class="parameter"><code>src_ctx</code></em> :</span></p></td>
206 <td>source security context to copy.</td>
209 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
210 <td>a copy of the <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> item. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
217 <div class="refsect2">
218 <a name="gsignond-security-context-free"></a><h3>gsignond_security_context_free ()</h3>
219 <pre class="programlisting"><span class="returnvalue">void</span> gsignond_security_context_free (<em class="parameter"><code><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *ctx</code></em>);</pre>
221 Frees a security context item.
223 <div class="variablelist"><table border="0">
224 <col align="left" valign="top">
226 <td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
228 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> to be freed.</td>
233 <div class="refsect2">
234 <a name="gsignond-security-context-from-variant"></a><h3>gsignond_security_context_from_variant ()</h3>
235 <pre class="programlisting"><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="returnvalue">GSignondSecurityContext</span></a> * gsignond_security_context_from_variant
236 (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *variant</code></em>);</pre>
238 Builds a <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> item from a GVariant of type "(ss)".
240 <div class="variablelist"><table border="0">
241 <col align="left" valign="top">
244 <td><p><span class="term"><em class="parameter"><code>variant</code></em> :</span></p></td>
245 <td>GVariant item with a <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> construct.</td>
248 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
250 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> item. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
257 <div class="refsect2">
258 <a name="gsignond-security-context-get-application-context"></a><h3>gsignond_security_context_get_application_context ()</h3>
259 <pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gsignond_security_context_get_application_context
260 (<em class="parameter"><code>const <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *ctx</code></em>);</pre>
262 Get the application context part of
263 the <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a>.
265 <div class="variablelist"><table border="0">
266 <col align="left" valign="top">
269 <td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
271 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> item.</td>
274 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
275 <td>application context. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
282 <div class="refsect2">
283 <a name="gsignond-security-context-get-system-context"></a><h3>gsignond_security_context_get_system_context ()</h3>
284 <pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gsignond_security_context_get_system_context
285 (<em class="parameter"><code>const <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *ctx</code></em>);</pre>
287 Get the system context partof the
288 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a>.
290 <div class="variablelist"><table border="0">
291 <col align="left" valign="top">
294 <td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
296 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> item.</td>
299 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
300 <td>system context. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
307 <div class="refsect2">
308 <a name="gsignond-security-context-list-copy"></a><h3>gsignond_security_context_list_copy ()</h3>
309 <pre class="programlisting"><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="returnvalue">GSignondSecurityContextList</span></a> * gsignond_security_context_list_copy
310 (<em class="parameter"><code>const <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="type">GSignondSecurityContextList</span></a> *src_list</code></em>);</pre>
312 Copies a GList of <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> items.
314 <div class="variablelist"><table border="0">
315 <col align="left" valign="top">
318 <td><p><span class="term"><em class="parameter"><code>src_list</code></em> :</span></p></td>
319 <td>source <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="type">GSignondSecurityContextList</span></a>.</td>
322 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
324 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="type">GSignondSecurityContextList</span></a> item. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
331 <div class="refsect2">
332 <a name="gsignond-security-context-list-free"></a><h3>gsignond_security_context_list_free ()</h3>
333 <pre class="programlisting"><span class="returnvalue">void</span> gsignond_security_context_list_free (<em class="parameter"><code><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="type">GSignondSecurityContextList</span></a> *seclist</code></em>);</pre>
335 Frees all items and the GList of <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a>.
337 <div class="variablelist"><table border="0">
338 <col align="left" valign="top">
340 <td><p><span class="term"><em class="parameter"><code>seclist</code></em> :</span></p></td>
342 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="type">GSignondSecurityContextList</span></a> item. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
348 <div class="refsect2">
349 <a name="gsignond-security-context-list-from-variant"></a><h3>gsignond_security_context_list_from_variant ()</h3>
350 <pre class="programlisting"><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="returnvalue">GSignondSecurityContextList</span></a> * gsignond_security_context_list_from_variant
351 (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *variant</code></em>);</pre>
353 Builds a GList of <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> items from a GVariant of type
356 <div class="variablelist"><table border="0">
357 <col align="left" valign="top">
360 <td><p><span class="term"><em class="parameter"><code>variant</code></em> :</span></p></td>
361 <td>GVariant item with a list of security context tuples.</td>
364 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
366 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="type">GSignondSecurityContextList</span></a> item. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
373 <div class="refsect2">
374 <a name="gsignond-security-context-list-to-variant"></a><h3>gsignond_security_context_list_to_variant ()</h3>
375 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * gsignond_security_context_list_to_variant
376 (<em class="parameter"><code>const <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="type">GSignondSecurityContextList</span></a> *list</code></em>);</pre>
378 Builds a GVariant of type "a(ss)" from a GList of <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a>
381 <div class="variablelist"><table border="0">
382 <col align="left" valign="top">
385 <td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
387 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="type">GSignondSecurityContextList</span></a> item.</td>
390 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
391 <td>GVariant construct of a <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="type">GSignondSecurityContextList</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
398 <div class="refsect2">
399 <a name="gsignond-security-context-match"></a><h3>gsignond_security_context_match ()</h3>
400 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gsignond_security_context_match (<em class="parameter"><code>const <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *ctx1</code></em>,
401 <em class="parameter"><code>const <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *ctx2</code></em>);</pre>
403 Compare two <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> items match.
405 <div class="variablelist"><table border="0">
406 <col align="left" valign="top">
409 <td><p><span class="term"><em class="parameter"><code>ctx1</code></em> :</span></p></td>
410 <td>first item to compare.</td>
413 <td><p><span class="term"><em class="parameter"><code>ctx2</code></em> :</span></p></td>
414 <td>second item to compare.</td>
417 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
418 <td>TRUE if contexts are equal or if either side has a wildcard match for
419 system context, or if system contexts are equal and either side has a wildcard
420 match for the app context,
421 otherwise FALSE. Two NULL contexts match.</td>
427 <div class="refsect2">
428 <a name="gsignond-security-context-new"></a><h3>gsignond_security_context_new ()</h3>
429 <pre class="programlisting"><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="returnvalue">GSignondSecurityContext</span></a> * gsignond_security_context_new ();</pre>
431 Allocates a new security context item. System and app context are empty strings.
433 <div class="variablelist"><table border="0">
434 <col align="left" valign="top">
436 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
437 <td>allocated <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
443 <div class="refsect2">
444 <a name="gsignond-security-context-new-from-values"></a><h3>gsignond_security_context_new_from_values ()</h3>
445 <pre class="programlisting"><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="returnvalue">GSignondSecurityContext</span></a> * gsignond_security_context_new_from_values
446 (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *system_context</code></em>,
447 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *application_context</code></em>);</pre>
449 Allocates and initializes a new security context item.
451 <div class="variablelist"><table border="0">
452 <col align="left" valign="top">
455 <td><p><span class="term"><em class="parameter"><code>system_context</code></em> :</span></p></td>
456 <td>system security context</td>
459 <td><p><span class="term"><em class="parameter"><code>application_context</code></em> :</span></p></td>
460 <td>application security context</td>
463 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
464 <td>allocated <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
471 <div class="refsect2">
472 <a name="gsignond-security-context-set-application-context"></a><h3>gsignond_security_context_set_application_context ()</h3>
473 <pre class="programlisting"><span class="returnvalue">void</span> gsignond_security_context_set_application_context
474 (<em class="parameter"><code><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *ctx</code></em>,
475 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *application_context</code></em>);</pre>
477 Sets the application context part of
478 the <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a>.
480 <div class="variablelist"><table border="0">
481 <col align="left" valign="top">
484 <td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
486 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> item.</td>
489 <td><p><span class="term"><em class="parameter"><code>application_context</code></em> :</span></p></td>
490 <td>application security context.</td>
496 <div class="refsect2">
497 <a name="gsignond-security-context-set-system-context"></a><h3>gsignond_security_context_set_system_context ()</h3>
498 <pre class="programlisting"><span class="returnvalue">void</span> gsignond_security_context_set_system_context
499 (<em class="parameter"><code><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *ctx</code></em>,
500 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *system_context</code></em>);</pre>
502 Sets the system context part of the
503 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a>.
505 <div class="variablelist"><table border="0">
506 <col align="left" valign="top">
509 <td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
511 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> item.</td>
514 <td><p><span class="term"><em class="parameter"><code>system_context</code></em> :</span></p></td>
515 <td>system security context.</td>
521 <div class="refsect2">
522 <a name="gsignond-security-context-to-variant"></a><h3>gsignond_security_context_to_variant ()</h3>
523 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * gsignond_security_context_to_variant
524 (<em class="parameter"><code>const <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *ctx</code></em>);</pre>
526 Build a GVariant of type "(ss)" from a <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> item.
528 <div class="variablelist"><table border="0">
529 <col align="left" valign="top">
532 <td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
534 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> item.</td>
537 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
538 <td>GVariant construct of a <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
548 Generated by GTK-Doc V1.19.1</div>