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>gsignond API Reference Manual: GSignondSecurityContext</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7 <link rel="home" href="index.html" title="gsignond API Reference Manual">
8 <link rel="up" href="ch06.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.20 (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" class="shortcuts">
17 <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
18 <a href="#gsignond-GSignondSecurityContext.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
19 <a href="#gsignond-GSignondSecurityContext.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
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="ch06.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 class="gallery_image" valign="top" align="right"></td>
35 <div class="refsect1">
36 <a name="gsignond-GSignondSecurityContext.functions"></a><h2>Functions</h2>
37 <div class="informaltable"><table width="100%" border="0">
39 <col width="150px" class="functions_return">
40 <col class="functions_name">
44 <td class="function_type">
45 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="returnvalue">GSignondSecurityContext</span></a> *
47 <td class="function_name">
48 <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-new" title="gsignond_security_context_new ()">gsignond_security_context_new</a> <span class="c_punctuation">()</span>
52 <td class="function_type">
53 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="returnvalue">GSignondSecurityContext</span></a> *
55 <td class="function_name">
56 <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> <span class="c_punctuation">()</span>
60 <td class="function_type">
61 <span class="returnvalue">void</span>
63 <td class="function_name">
64 <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-free" title="gsignond_security_context_free ()">gsignond_security_context_free</a> <span class="c_punctuation">()</span>
68 <td class="function_type">
69 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="returnvalue">GSignondSecurityContext</span></a> *
71 <td class="function_name">
72 <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-copy" title="gsignond_security_context_copy ()">gsignond_security_context_copy</a> <span class="c_punctuation">()</span>
76 <td class="function_type">
77 <span class="returnvalue">void</span>
79 <td class="function_name">
80 <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> <span class="c_punctuation">()</span>
84 <td class="function_type">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
86 <td class="function_name">
87 <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> <span class="c_punctuation">()</span>
91 <td class="function_type">
92 <span class="returnvalue">void</span>
94 <td class="function_name">
95 <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> <span class="c_punctuation">()</span>
99 <td class="function_type">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
101 <td class="function_name">
102 <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> <span class="c_punctuation">()</span>
106 <td class="function_type">
107 <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
109 <td class="function_name">
110 <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-to-variant" title="gsignond_security_context_to_variant ()">gsignond_security_context_to_variant</a> <span class="c_punctuation">()</span>
114 <td class="function_type">
115 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="returnvalue">GSignondSecurityContext</span></a> *
117 <td class="function_name">
118 <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-from-variant" title="gsignond_security_context_from_variant ()">gsignond_security_context_from_variant</a> <span class="c_punctuation">()</span>
122 <td class="function_type">
123 <span class="returnvalue">int</span>
125 <td class="function_name">
126 <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-compare" title="gsignond_security_context_compare ()">gsignond_security_context_compare</a> <span class="c_punctuation">()</span>
130 <td class="function_type">
131 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
133 <td class="function_name">
134 <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-match" title="gsignond_security_context_match ()">gsignond_security_context_match</a> <span class="c_punctuation">()</span>
138 <td class="function_type">
139 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
141 <td class="function_name">
142 <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-check" title="gsignond_security_context_check ()">gsignond_security_context_check</a> <span class="c_punctuation">()</span>
146 <td class="function_type">
147 <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
149 <td class="function_name">
150 <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> <span class="c_punctuation">()</span>
154 <td class="function_type">
155 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="returnvalue">GSignondSecurityContextList</span></a> *
157 <td class="function_name">
158 <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> <span class="c_punctuation">()</span>
162 <td class="function_type">
163 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="returnvalue">GSignondSecurityContextList</span></a> *
165 <td class="function_name">
166 <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-list-copy" title="gsignond_security_context_list_copy ()">gsignond_security_context_list_copy</a> <span class="c_punctuation">()</span>
170 <td class="function_type">
171 <span class="returnvalue">void</span>
173 <td class="function_name">
174 <a class="link" href="gsignond-GSignondSecurityContext.html#gsignond-security-context-list-free" title="gsignond_security_context_list_free ()">gsignond_security_context_list_free</a> <span class="c_punctuation">()</span>
180 <div class="refsect1">
181 <a name="gsignond-GSignondSecurityContext.other"></a><h2>Types and Values</h2>
182 <div class="informaltable"><table width="100%" border="0">
184 <col width="150px" class="name">
185 <col class="description">
189 <td class="datatype_keyword"> </td>
190 <td class="function_name"><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext">GSignondSecurityContext</a></td>
193 <td class="typedef_keyword">typedef</td>
194 <td class="function_name"><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList">GSignondSecurityContextList</a></td>
199 <div class="refsect1">
200 <a name="gsignond-GSignondSecurityContext.object-hierarchy"></a><h2>Object Hierarchy</h2>
204 <div class="refsect1">
205 <a name="gsignond-GSignondSecurityContext.includes"></a><h2>Includes</h2>
206 <pre class="synopsis">#include <gsignond/gsignond-security-context.h>
209 <div class="refsect1">
210 <a name="gsignond-GSignondSecurityContext.description"></a><h2>Description</h2>
211 <p>Security context is a string tuple of system context and application context.</p>
212 <p>System context can be a binary path, SMACK-label, or MSSF token.</p>
213 <p>Application context identifies a script or a webpage within an application,
214 and it's used for providing access control to runtime environments (when making an access
215 control decision requires not only a binary identifier, but also information
216 about what the binary is doing).</p>
217 <p>When an application is trying to access the gSSO service, the system context
218 is determined by a specific <a class="link" href="GSignondAccessControlManager.html" title="GSignondAccessControlManager"><span class="type">GSignondAccessControlManager</span></a> instance using
219 system services of a specific platform. Application context is set by the
220 application itself. Then both contexts are used by <a class="link" href="GSignondAccessControlManager.html" title="GSignondAccessControlManager"><span class="type">GSignondAccessControlManager</span></a>
221 to perform an access control check.</p>
223 <div class="refsect1">
224 <a name="gsignond-GSignondSecurityContext.functions_details"></a><h2>Functions</h2>
225 <div class="refsect2">
226 <a name="gsignond-security-context-new"></a><h3>gsignond_security_context_new ()</h3>
227 <pre class="programlisting"><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="returnvalue">GSignondSecurityContext</span></a> *
228 gsignond_security_context_new ();</pre>
229 <p>Allocates a new security context item. System and app context are empty strings.</p>
230 <div class="refsect3">
231 <a name="id-1.7.4.8.2.5"></a><h4>Returns</h4>
232 <p> allocated <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a>. </p>
233 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
237 <div class="refsect2">
238 <a name="gsignond-security-context-new-from-values"></a><h3>gsignond_security_context_new_from_values ()</h3>
239 <pre class="programlisting"><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="returnvalue">GSignondSecurityContext</span></a> *
240 gsignond_security_context_new_from_values
241 (<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>,
242 <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>
243 <p>Allocates and initializes a new security context item.</p>
244 <div class="refsect3">
245 <a name="id-1.7.4.8.3.5"></a><h4>Parameters</h4>
246 <div class="informaltable"><table width="100%" border="0">
248 <col width="150px" class="parameters_name">
249 <col class="parameters_description">
250 <col width="200px" class="parameters_annotations">
254 <td class="parameter_name"><p>system_context</p></td>
255 <td class="parameter_description"><p>system security context</p></td>
256 <td class="parameter_annotations"> </td>
259 <td class="parameter_name"><p>application_context</p></td>
260 <td class="parameter_description"><p>application security context</p></td>
261 <td class="parameter_annotations"> </td>
266 <div class="refsect3">
267 <a name="id-1.7.4.8.3.6"></a><h4>Returns</h4>
268 <p> allocated <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a>. </p>
269 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
273 <div class="refsect2">
274 <a name="gsignond-security-context-free"></a><h3>gsignond_security_context_free ()</h3>
275 <pre class="programlisting"><span class="returnvalue">void</span>
276 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>
277 <p>Frees a security context item.</p>
278 <div class="refsect3">
279 <a name="id-1.7.4.8.4.5"></a><h4>Parameters</h4>
280 <div class="informaltable"><table width="100%" border="0">
282 <col width="150px" class="parameters_name">
283 <col class="parameters_description">
284 <col width="200px" class="parameters_annotations">
287 <td class="parameter_name"><p>ctx</p></td>
288 <td class="parameter_description"><p><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> to be freed.</p></td>
289 <td class="parameter_annotations"> </td>
295 <div class="refsect2">
296 <a name="gsignond-security-context-copy"></a><h3>gsignond_security_context_copy ()</h3>
297 <pre class="programlisting"><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="returnvalue">GSignondSecurityContext</span></a> *
298 gsignond_security_context_copy (<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>
299 <p>Copies a security context item.</p>
300 <div class="refsect3">
301 <a name="id-1.7.4.8.5.5"></a><h4>Parameters</h4>
302 <div class="informaltable"><table width="100%" border="0">
304 <col width="150px" class="parameters_name">
305 <col class="parameters_description">
306 <col width="200px" class="parameters_annotations">
309 <td class="parameter_name"><p>src_ctx</p></td>
310 <td class="parameter_description"><p>source security context to copy.</p></td>
311 <td class="parameter_annotations"> </td>
315 <div class="refsect3">
316 <a name="id-1.7.4.8.5.6"></a><h4>Returns</h4>
317 <p> a copy of the <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> item. </p>
318 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
322 <div class="refsect2">
323 <a name="gsignond-security-context-set-system-context"></a><h3>gsignond_security_context_set_system_context ()</h3>
324 <pre class="programlisting"><span class="returnvalue">void</span>
325 gsignond_security_context_set_system_context
326 (<em class="parameter"><code><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *ctx</code></em>,
327 <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>
328 <p>Sets the system context part of the
329 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a>.</p>
330 <div class="refsect3">
331 <a name="id-1.7.4.8.6.5"></a><h4>Parameters</h4>
332 <div class="informaltable"><table width="100%" border="0">
334 <col width="150px" class="parameters_name">
335 <col class="parameters_description">
336 <col width="200px" class="parameters_annotations">
340 <td class="parameter_name"><p>ctx</p></td>
341 <td class="parameter_description"><p><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> item.</p></td>
342 <td class="parameter_annotations"> </td>
345 <td class="parameter_name"><p>system_context</p></td>
346 <td class="parameter_description"><p>system security context.</p></td>
347 <td class="parameter_annotations"> </td>
354 <div class="refsect2">
355 <a name="gsignond-security-context-get-system-context"></a><h3>gsignond_security_context_get_system_context ()</h3>
356 <pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
357 gsignond_security_context_get_system_context
358 (<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>
359 <p>Get the system context partof the
360 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a>.</p>
361 <div class="refsect3">
362 <a name="id-1.7.4.8.7.5"></a><h4>Parameters</h4>
363 <div class="informaltable"><table width="100%" border="0">
365 <col width="150px" class="parameters_name">
366 <col class="parameters_description">
367 <col width="200px" class="parameters_annotations">
370 <td class="parameter_name"><p>ctx</p></td>
371 <td class="parameter_description"><p><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> item.</p></td>
372 <td class="parameter_annotations"> </td>
376 <div class="refsect3">
377 <a name="id-1.7.4.8.7.6"></a><h4>Returns</h4>
378 <p> system context. </p>
379 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
383 <div class="refsect2">
384 <a name="gsignond-security-context-set-application-context"></a><h3>gsignond_security_context_set_application_context ()</h3>
385 <pre class="programlisting"><span class="returnvalue">void</span>
386 gsignond_security_context_set_application_context
387 (<em class="parameter"><code><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> *ctx</code></em>,
388 <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>
389 <p>Sets the application context part of
390 the <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a>.</p>
391 <div class="refsect3">
392 <a name="id-1.7.4.8.8.5"></a><h4>Parameters</h4>
393 <div class="informaltable"><table width="100%" border="0">
395 <col width="150px" class="parameters_name">
396 <col class="parameters_description">
397 <col width="200px" class="parameters_annotations">
401 <td class="parameter_name"><p>ctx</p></td>
402 <td class="parameter_description"><p><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> item.</p></td>
403 <td class="parameter_annotations"> </td>
406 <td class="parameter_name"><p>application_context</p></td>
407 <td class="parameter_description"><p>application security context.</p></td>
408 <td class="parameter_annotations"> </td>
415 <div class="refsect2">
416 <a name="gsignond-security-context-get-application-context"></a><h3>gsignond_security_context_get_application_context ()</h3>
417 <pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
418 gsignond_security_context_get_application_context
419 (<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>
420 <p>Get the application context part of
421 the <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a>.</p>
422 <div class="refsect3">
423 <a name="id-1.7.4.8.9.5"></a><h4>Parameters</h4>
424 <div class="informaltable"><table width="100%" border="0">
426 <col width="150px" class="parameters_name">
427 <col class="parameters_description">
428 <col width="200px" class="parameters_annotations">
431 <td class="parameter_name"><p>ctx</p></td>
432 <td class="parameter_description"><p><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> item.</p></td>
433 <td class="parameter_annotations"> </td>
437 <div class="refsect3">
438 <a name="id-1.7.4.8.9.6"></a><h4>Returns</h4>
439 <p> application context. </p>
440 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
444 <div class="refsect2">
445 <a name="gsignond-security-context-to-variant"></a><h3>gsignond_security_context_to_variant ()</h3>
446 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
447 gsignond_security_context_to_variant (<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>
448 <p>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.</p>
449 <div class="refsect3">
450 <a name="id-1.7.4.8.10.5"></a><h4>Parameters</h4>
451 <div class="informaltable"><table width="100%" border="0">
453 <col width="150px" class="parameters_name">
454 <col class="parameters_description">
455 <col width="200px" class="parameters_annotations">
458 <td class="parameter_name"><p>ctx</p></td>
459 <td class="parameter_description"><p><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> item.</p></td>
460 <td class="parameter_annotations"> </td>
464 <div class="refsect3">
465 <a name="id-1.7.4.8.10.6"></a><h4>Returns</h4>
466 <p> GVariant construct of a <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a>. </p>
467 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
471 <div class="refsect2">
472 <a name="gsignond-security-context-from-variant"></a><h3>gsignond_security_context_from_variant ()</h3>
473 <pre class="programlisting"><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="returnvalue">GSignondSecurityContext</span></a> *
474 gsignond_security_context_from_variant
475 (<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>
476 <p>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)".</p>
477 <div class="refsect3">
478 <a name="id-1.7.4.8.11.5"></a><h4>Parameters</h4>
479 <div class="informaltable"><table width="100%" border="0">
481 <col width="150px" class="parameters_name">
482 <col class="parameters_description">
483 <col width="200px" class="parameters_annotations">
486 <td class="parameter_name"><p>variant</p></td>
487 <td class="parameter_description"><p>GVariant item with a <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> construct.</p></td>
488 <td class="parameter_annotations"> </td>
492 <div class="refsect3">
493 <a name="id-1.7.4.8.11.6"></a><h4>Returns</h4>
494 <p> <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> item. </p>
495 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
499 <div class="refsect2">
500 <a name="gsignond-security-context-compare"></a><h3>gsignond_security_context_compare ()</h3>
501 <pre class="programlisting"><span class="returnvalue">int</span>
502 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>,
503 <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>
504 <p>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>.</p>
505 <div class="refsect3">
506 <a name="id-1.7.4.8.12.5"></a><h4>Parameters</h4>
507 <div class="informaltable"><table width="100%" border="0">
509 <col width="150px" class="parameters_name">
510 <col class="parameters_description">
511 <col width="200px" class="parameters_annotations">
515 <td class="parameter_name"><p>ctx1</p></td>
516 <td class="parameter_description"><p>first item to compare.</p></td>
517 <td class="parameter_annotations"> </td>
520 <td class="parameter_name"><p>ctx2</p></td>
521 <td class="parameter_description"><p>second item to compare.</p></td>
522 <td class="parameter_annotations"> </td>
527 <div class="refsect3">
528 <a name="id-1.7.4.8.12.6"></a><h4>Returns</h4>
529 <p> negative if ctx1 < ctx2, 0 if ctx1 == ctx2 and positive if ctx1 > ctx2.</p>
534 <div class="refsect2">
535 <a name="gsignond-security-context-match"></a><h3>gsignond_security_context_match ()</h3>
536 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
537 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>,
538 <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>
539 <p>Compare two <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> items match.</p>
540 <div class="refsect3">
541 <a name="id-1.7.4.8.13.5"></a><h4>Parameters</h4>
542 <div class="informaltable"><table width="100%" border="0">
544 <col width="150px" class="parameters_name">
545 <col class="parameters_description">
546 <col width="200px" class="parameters_annotations">
550 <td class="parameter_name"><p>ctx1</p></td>
551 <td class="parameter_description"><p>first item to compare.</p></td>
552 <td class="parameter_annotations"> </td>
555 <td class="parameter_name"><p>ctx2</p></td>
556 <td class="parameter_description"><p>second item to compare.</p></td>
557 <td class="parameter_annotations"> </td>
562 <div class="refsect3">
563 <a name="id-1.7.4.8.13.6"></a><h4>Returns</h4>
564 <p> TRUE if contexts are equal or if either side has a wildcard match for
565 system context, or if system contexts are equal and either side has a wildcard
566 match for the app context,
567 otherwise FALSE. Two NULL contexts match.</p>
572 <div class="refsect2">
573 <a name="gsignond-security-context-check"></a><h3>gsignond_security_context_check ()</h3>
574 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
575 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>,
576 <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>
577 <p>Check if <em class="parameter"><code>test</code></em>
578 is covered by <em class="parameter"><code>reference</code></em>
580 <div class="refsect3">
581 <a name="id-1.7.4.8.14.5"></a><h4>Parameters</h4>
582 <div class="informaltable"><table width="100%" border="0">
584 <col width="150px" class="parameters_name">
585 <col class="parameters_description">
586 <col width="200px" class="parameters_annotations">
590 <td class="parameter_name"><p>reference</p></td>
591 <td class="parameter_description"><p>reference security context item to check against.</p></td>
592 <td class="parameter_annotations"> </td>
595 <td class="parameter_name"><p>test</p></td>
596 <td class="parameter_description"><p>security context item to be checked.</p></td>
597 <td class="parameter_annotations"> </td>
602 <div class="refsect3">
603 <a name="id-1.7.4.8.14.6"></a><h4>Returns</h4>
604 <p> TRUE if contexts are equal or the <em class="parameter"><code>reference</code></em>
606 system context, or if system contexts are equal and <em class="parameter"><code>reference</code></em>
608 application context, otherwise FALSE. If either or both contexts are NULL,
609 FALSE is returned.</p>
614 <div class="refsect2">
615 <a name="gsignond-security-context-list-to-variant"></a><h3>gsignond_security_context_list_to_variant ()</h3>
616 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
617 gsignond_security_context_list_to_variant
618 (<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>
619 <p>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>
621 <div class="refsect3">
622 <a name="id-1.7.4.8.15.5"></a><h4>Parameters</h4>
623 <div class="informaltable"><table width="100%" border="0">
625 <col width="150px" class="parameters_name">
626 <col class="parameters_description">
627 <col width="200px" class="parameters_annotations">
630 <td class="parameter_name"><p>list</p></td>
631 <td class="parameter_description"><p><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="type">GSignondSecurityContextList</span></a> item.</p></td>
632 <td class="parameter_annotations"> </td>
636 <div class="refsect3">
637 <a name="id-1.7.4.8.15.6"></a><h4>Returns</h4>
638 <p> GVariant construct of a <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="type">GSignondSecurityContextList</span></a>. </p>
639 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
643 <div class="refsect2">
644 <a name="gsignond-security-context-list-from-variant"></a><h3>gsignond_security_context_list_from_variant ()</h3>
645 <pre class="programlisting"><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="returnvalue">GSignondSecurityContextList</span></a> *
646 gsignond_security_context_list_from_variant
647 (<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>
648 <p>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
650 <div class="refsect3">
651 <a name="id-1.7.4.8.16.5"></a><h4>Parameters</h4>
652 <div class="informaltable"><table width="100%" border="0">
654 <col width="150px" class="parameters_name">
655 <col class="parameters_description">
656 <col width="200px" class="parameters_annotations">
659 <td class="parameter_name"><p>variant</p></td>
660 <td class="parameter_description"><p>GVariant item with a list of security context tuples.</p></td>
661 <td class="parameter_annotations"> </td>
665 <div class="refsect3">
666 <a name="id-1.7.4.8.16.6"></a><h4>Returns</h4>
667 <p> <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="type">GSignondSecurityContextList</span></a> item. </p>
668 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
672 <div class="refsect2">
673 <a name="gsignond-security-context-list-copy"></a><h3>gsignond_security_context_list_copy ()</h3>
674 <pre class="programlisting"><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="returnvalue">GSignondSecurityContextList</span></a> *
675 gsignond_security_context_list_copy (<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>
676 <p>Copies a GList of <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> items.</p>
677 <div class="refsect3">
678 <a name="id-1.7.4.8.17.5"></a><h4>Parameters</h4>
679 <div class="informaltable"><table width="100%" border="0">
681 <col width="150px" class="parameters_name">
682 <col class="parameters_description">
683 <col width="200px" class="parameters_annotations">
686 <td class="parameter_name"><p>src_list</p></td>
687 <td class="parameter_description"><p>source <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="type">GSignondSecurityContextList</span></a>.</p></td>
688 <td class="parameter_annotations"> </td>
692 <div class="refsect3">
693 <a name="id-1.7.4.8.17.6"></a><h4>Returns</h4>
694 <p> <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="type">GSignondSecurityContextList</span></a> item. </p>
695 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
699 <div class="refsect2">
700 <a name="gsignond-security-context-list-free"></a><h3>gsignond_security_context_list_free ()</h3>
701 <pre class="programlisting"><span class="returnvalue">void</span>
702 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>
703 <p>Frees all items and the GList of <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a>.</p>
704 <div class="refsect3">
705 <a name="id-1.7.4.8.18.5"></a><h4>Parameters</h4>
706 <div class="informaltable"><table width="100%" border="0">
708 <col width="150px" class="parameters_name">
709 <col class="parameters_description">
710 <col width="200px" class="parameters_annotations">
713 <td class="parameter_name"><p>seclist</p></td>
714 <td class="parameter_description"><p> <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="type">GSignondSecurityContextList</span></a> item. </p></td>
715 <td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td>
721 <div class="refsect1">
722 <a name="gsignond-GSignondSecurityContext.other_details"></a><h2>Types and Values</h2>
723 <div class="refsect2">
724 <a name="GSignondSecurityContext"></a><h3>GSignondSecurityContext</h3>
725 <pre class="programlisting">typedef struct {
728 } GSignondSecurityContext;
730 <p>Security context descriptor used for access control checks. System context
731 and application context can contain a wildcard match "*" which has special
732 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
733 <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>.</p>
734 <div class="refsect3">
735 <a name="id-1.7.4.9.2.5"></a><h4>Members</h4>
736 <div class="informaltable"><table width="100%" border="0">
738 <col width="300px" class="struct_members_name">
739 <col class="struct_members_description">
740 <col width="200px" class="struct_members_annotations">
744 <td class="struct_member_name"><p><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>;</p></td>
745 <td class="struct_member_description"><p>system context</p></td>
746 <td class="struct_member_annotations"> </td>
749 <td class="struct_member_name"><p><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>;</p></td>
750 <td class="struct_member_description"><p>application context</p></td>
751 <td class="struct_member_annotations"> </td>
758 <div class="refsect2">
759 <a name="GSignondSecurityContextList"></a><h3>GSignondSecurityContextList</h3>
760 <pre class="programlisting">typedef GList GSignondSecurityContextList;
762 <p>GList of <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> items.</p>
768 Generated by GTK-Doc V1.20</div>