Update to upstream 1.0.1
[profile/ivi/gsignond.git] / docs / html / gsignond-GSignondSecurityContext.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
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">
13 </head>
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>
20 </td>
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>
25 </tr></table>
26 <div class="refentry">
27 <a name="gsignond-GSignondSecurityContext"></a><div class="titlepage"></div>
28 <div class="refnamediv"><table width="100%"><tr>
29 <td valign="top">
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>
32 </td>
33 <td class="gallery_image" valign="top" align="right"></td>
34 </tr></table></div>
35 <div class="refsect1">
36 <a name="gsignond-GSignondSecurityContext.functions"></a><h2>Functions</h2>
37 <div class="informaltable"><table width="100%" border="0">
38 <colgroup>
39 <col width="150px" class="functions_return">
40 <col class="functions_name">
41 </colgroup>
42 <tbody>
43 <tr>
44 <td class="function_type">
45 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="returnvalue">GSignondSecurityContext</span></a> *
46 </td>
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>
49 </td>
50 </tr>
51 <tr>
52 <td class="function_type">
53 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="returnvalue">GSignondSecurityContext</span></a> *
54 </td>
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>
57 </td>
58 </tr>
59 <tr>
60 <td class="function_type">
61 <span class="returnvalue">void</span>
62 </td>
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>
65 </td>
66 </tr>
67 <tr>
68 <td class="function_type">
69 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="returnvalue">GSignondSecurityContext</span></a> *
70 </td>
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>
73 </td>
74 </tr>
75 <tr>
76 <td class="function_type">
77 <span class="returnvalue">void</span>
78 </td>
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>
81 </td>
82 </tr>
83 <tr>
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> *
85 </td>
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>
88 </td>
89 </tr>
90 <tr>
91 <td class="function_type">
92 <span class="returnvalue">void</span>
93 </td>
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>
96 </td>
97 </tr>
98 <tr>
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> *
100 </td>
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>
103 </td>
104 </tr>
105 <tr>
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> *
108 </td>
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>
111 </td>
112 </tr>
113 <tr>
114 <td class="function_type">
115 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="returnvalue">GSignondSecurityContext</span></a> *
116 </td>
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>
119 </td>
120 </tr>
121 <tr>
122 <td class="function_type">
123 <span class="returnvalue">int</span>
124 </td>
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>
127 </td>
128 </tr>
129 <tr>
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>
132 </td>
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>
135 </td>
136 </tr>
137 <tr>
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>
140 </td>
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>
143 </td>
144 </tr>
145 <tr>
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> *
148 </td>
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>
151 </td>
152 </tr>
153 <tr>
154 <td class="function_type">
155 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="returnvalue">GSignondSecurityContextList</span></a> *
156 </td>
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>
159 </td>
160 </tr>
161 <tr>
162 <td class="function_type">
163 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="returnvalue">GSignondSecurityContextList</span></a> *
164 </td>
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>
167 </td>
168 </tr>
169 <tr>
170 <td class="function_type">
171 <span class="returnvalue">void</span>
172 </td>
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>
175 </td>
176 </tr>
177 </tbody>
178 </table></div>
179 </div>
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">
183 <colgroup>
184 <col width="150px" class="name">
185 <col class="description">
186 </colgroup>
187 <tbody>
188 <tr>
189 <td class="datatype_keyword"> </td>
190 <td class="function_name"><a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext">GSignondSecurityContext</a></td>
191 </tr>
192 <tr>
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>
195 </tr>
196 </tbody>
197 </table></div>
198 </div>
199 <div class="refsect1">
200 <a name="gsignond-GSignondSecurityContext.object-hierarchy"></a><h2>Object Hierarchy</h2>
201 <pre class="screen">
202 </pre>
203 </div>
204 <div class="refsect1">
205 <a name="gsignond-GSignondSecurityContext.includes"></a><h2>Includes</h2>
206 <pre class="synopsis">#include &lt;gsignond/gsignond-security-context.h&gt;
207 </pre>
208 </div>
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>
222 </div>
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>
234 </div>
235 </div>
236 <hr>
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">
247 <colgroup>
248 <col width="150px" class="parameters_name">
249 <col class="parameters_description">
250 <col width="200px" class="parameters_annotations">
251 </colgroup>
252 <tbody>
253 <tr>
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>
257 </tr>
258 <tr>
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>
262 </tr>
263 </tbody>
264 </table></div>
265 </div>
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>
270 </div>
271 </div>
272 <hr>
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">
281 <colgroup>
282 <col width="150px" class="parameters_name">
283 <col class="parameters_description">
284 <col width="200px" class="parameters_annotations">
285 </colgroup>
286 <tbody><tr>
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>
290 </tr></tbody>
291 </table></div>
292 </div>
293 </div>
294 <hr>
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">
303 <colgroup>
304 <col width="150px" class="parameters_name">
305 <col class="parameters_description">
306 <col width="200px" class="parameters_annotations">
307 </colgroup>
308 <tbody><tr>
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>
312 </tr></tbody>
313 </table></div>
314 </div>
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>
319 </div>
320 </div>
321 <hr>
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">
333 <colgroup>
334 <col width="150px" class="parameters_name">
335 <col class="parameters_description">
336 <col width="200px" class="parameters_annotations">
337 </colgroup>
338 <tbody>
339 <tr>
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>
343 </tr>
344 <tr>
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>
348 </tr>
349 </tbody>
350 </table></div>
351 </div>
352 </div>
353 <hr>
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">
364 <colgroup>
365 <col width="150px" class="parameters_name">
366 <col class="parameters_description">
367 <col width="200px" class="parameters_annotations">
368 </colgroup>
369 <tbody><tr>
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>
373 </tr></tbody>
374 </table></div>
375 </div>
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>
380 </div>
381 </div>
382 <hr>
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">
394 <colgroup>
395 <col width="150px" class="parameters_name">
396 <col class="parameters_description">
397 <col width="200px" class="parameters_annotations">
398 </colgroup>
399 <tbody>
400 <tr>
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>
404 </tr>
405 <tr>
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>
409 </tr>
410 </tbody>
411 </table></div>
412 </div>
413 </div>
414 <hr>
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">
425 <colgroup>
426 <col width="150px" class="parameters_name">
427 <col class="parameters_description">
428 <col width="200px" class="parameters_annotations">
429 </colgroup>
430 <tbody><tr>
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>
434 </tr></tbody>
435 </table></div>
436 </div>
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>
441 </div>
442 </div>
443 <hr>
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">
452 <colgroup>
453 <col width="150px" class="parameters_name">
454 <col class="parameters_description">
455 <col width="200px" class="parameters_annotations">
456 </colgroup>
457 <tbody><tr>
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>
461 </tr></tbody>
462 </table></div>
463 </div>
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>
468 </div>
469 </div>
470 <hr>
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">
480 <colgroup>
481 <col width="150px" class="parameters_name">
482 <col class="parameters_description">
483 <col width="200px" class="parameters_annotations">
484 </colgroup>
485 <tbody><tr>
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>
489 </tr></tbody>
490 </table></div>
491 </div>
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>
496 </div>
497 </div>
498 <hr>
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">
508 <colgroup>
509 <col width="150px" class="parameters_name">
510 <col class="parameters_description">
511 <col width="200px" class="parameters_annotations">
512 </colgroup>
513 <tbody>
514 <tr>
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>
518 </tr>
519 <tr>
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>
523 </tr>
524 </tbody>
525 </table></div>
526 </div>
527 <div class="refsect3">
528 <a name="id-1.7.4.8.12.6"></a><h4>Returns</h4>
529 <p> negative if ctx1 &lt; ctx2, 0 if ctx1 == ctx2 and positive if ctx1 &gt; ctx2.</p>
530 <p></p>
531 </div>
532 </div>
533 <hr>
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">
543 <colgroup>
544 <col width="150px" class="parameters_name">
545 <col class="parameters_description">
546 <col width="200px" class="parameters_annotations">
547 </colgroup>
548 <tbody>
549 <tr>
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>
553 </tr>
554 <tr>
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>
558 </tr>
559 </tbody>
560 </table></div>
561 </div>
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>
568 <p></p>
569 </div>
570 </div>
571 <hr>
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>
579 .</p>
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">
583 <colgroup>
584 <col width="150px" class="parameters_name">
585 <col class="parameters_description">
586 <col width="200px" class="parameters_annotations">
587 </colgroup>
588 <tbody>
589 <tr>
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>
593 </tr>
594 <tr>
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>
598 </tr>
599 </tbody>
600 </table></div>
601 </div>
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>
605 has a wildcard
606 system context, or if system contexts are equal and <em class="parameter"><code>reference</code></em>
607 has a wildcard
608 application context, otherwise FALSE. If either or both contexts are NULL,
609 FALSE is returned.</p>
610 <p></p>
611 </div>
612 </div>
613 <hr>
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>
620 items.</p>
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">
624 <colgroup>
625 <col width="150px" class="parameters_name">
626 <col class="parameters_description">
627 <col width="200px" class="parameters_annotations">
628 </colgroup>
629 <tbody><tr>
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>
633 </tr></tbody>
634 </table></div>
635 </div>
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>
640 </div>
641 </div>
642 <hr>
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
649 "a(ss)".</p>
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">
653 <colgroup>
654 <col width="150px" class="parameters_name">
655 <col class="parameters_description">
656 <col width="200px" class="parameters_annotations">
657 </colgroup>
658 <tbody><tr>
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>
662 </tr></tbody>
663 </table></div>
664 </div>
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>
669 </div>
670 </div>
671 <hr>
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">
680 <colgroup>
681 <col width="150px" class="parameters_name">
682 <col class="parameters_description">
683 <col width="200px" class="parameters_annotations">
684 </colgroup>
685 <tbody><tr>
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>
689 </tr></tbody>
690 </table></div>
691 </div>
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>
696 </div>
697 </div>
698 <hr>
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">
707 <colgroup>
708 <col width="150px" class="parameters_name">
709 <col class="parameters_description">
710 <col width="200px" class="parameters_annotations">
711 </colgroup>
712 <tbody><tr>
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>
716 </tr></tbody>
717 </table></div>
718 </div>
719 </div>
720 </div>
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 {
726     gchar *sys_ctx;
727     gchar *app_ctx;
728 } GSignondSecurityContext;
729 </pre>
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">
737 <colgroup>
738 <col width="300px" class="struct_members_name">
739 <col class="struct_members_description">
740 <col width="200px" class="struct_members_annotations">
741 </colgroup>
742 <tbody>
743 <tr>
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>
747 </tr>
748 <tr>
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>
752 </tr>
753 </tbody>
754 </table></div>
755 </div>
756 </div>
757 <hr>
758 <div class="refsect2">
759 <a name="GSignondSecurityContextList"></a><h3>GSignondSecurityContextList</h3>
760 <pre class="programlisting">typedef GList GSignondSecurityContextList;
761 </pre>
762 <p>GList of <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> items.</p>
763 </div>
764 </div>
765 </div>
766 <div class="footer">
767 <hr>
768           Generated by GTK-Doc V1.20</div>
769 </body>
770 </html>