3fffcefad08e0c35d11ab1bc8ca45f0c8f08b3ed
[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>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">
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">
17 <a href="#" class="shortcut">Top</a>
18                    | 
19                   <a href="#gsignond-GSignondSecurityContext.description" class="shortcut">Description</a>
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="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>
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 valign="top" align="right"></td>
34 </tr></table></div>
35 <div class="refsynopsisdiv">
36 <a name="gsignond-GSignondSecurityContext.synopsis"></a><h2>Synopsis</h2>
37 <pre class="synopsis">
38 #include &lt;gsignond/gsignond-security-context.h&gt;
39
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>);
76 </pre>
77 </div>
78 <div class="refsect1">
79 <a name="gsignond-GSignondSecurityContext.description"></a><h2>Description</h2>
80 <p>
81 Security context is a string tuple of system context and application context.
82 </p>
83 <p>
84 System context can be a binary path, SMACK-label, or MSSF token.
85 </p>
86 <p>
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).
91 </p>
92 <p>
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.
98 </p>
99 </div>
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 {
105     gchar *sys_ctx;
106     gchar *app_ctx;
107 } GSignondSecurityContext;
108 </pre>
109 <p>
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>.
114 </p>
115 <div class="variablelist"><table border="0">
116 <col align="left" valign="top">
117 <tbody>
118 <tr>
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>
121 </tr>
122 <tr>
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>
125 </tr>
126 </tbody>
127 </table></div>
128 </div>
129 <hr>
130 <div class="refsect2">
131 <a name="GSignondSecurityContextList"></a><h3>GSignondSecurityContextList</h3>
132 <pre class="programlisting">typedef GList GSignondSecurityContextList;
133 </pre>
134 <p>
135 GList of <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> items.
136 </p>
137 </div>
138 <hr>
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>
143 <p>
144 Check if <em class="parameter"><code>test</code></em> is covered by <em class="parameter"><code>reference</code></em>.
145 </p>
146 <div class="variablelist"><table border="0">
147 <col align="left" valign="top">
148 <tbody>
149 <tr>
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>
152 </tr>
153 <tr>
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>
156 </tr>
157 <tr>
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>
163 </tr>
164 </tbody>
165 </table></div>
166 </div>
167 <hr>
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>
172 <p>
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>.
174 </p>
175 <div class="variablelist"><table border="0">
176 <col align="left" valign="top">
177 <tbody>
178 <tr>
179 <td><p><span class="term"><em class="parameter"><code>ctx1</code></em> :</span></p></td>
180 <td>first item to compare.</td>
181 </tr>
182 <tr>
183 <td><p><span class="term"><em class="parameter"><code>ctx2</code></em> :</span></p></td>
184 <td>second item to compare.</td>
185 </tr>
186 <tr>
187 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
188 <td>negative if ctx1 &lt; ctx2, 0 if ctx1 == ctx2 and positive if ctx1 &gt; ctx2.</td>
189 </tr>
190 </tbody>
191 </table></div>
192 </div>
193 <hr>
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>
198 <p>
199 Copies a security context item.
200 </p>
201 <div class="variablelist"><table border="0">
202 <col align="left" valign="top">
203 <tbody>
204 <tr>
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>
207 </tr>
208 <tr>
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>
211 </td>
212 </tr>
213 </tbody>
214 </table></div>
215 </div>
216 <hr>
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>
220 <p>
221 Frees a security context item.
222 </p>
223 <div class="variablelist"><table border="0">
224 <col align="left" valign="top">
225 <tbody><tr>
226 <td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
227 <td>
228 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> to be freed.</td>
229 </tr></tbody>
230 </table></div>
231 </div>
232 <hr>
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>
237 <p>
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)".
239 </p>
240 <div class="variablelist"><table border="0">
241 <col align="left" valign="top">
242 <tbody>
243 <tr>
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>
246 </tr>
247 <tr>
248 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
249 <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>
251 </td>
252 </tr>
253 </tbody>
254 </table></div>
255 </div>
256 <hr>
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>
261 <p>
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>.
264 </p>
265 <div class="variablelist"><table border="0">
266 <col align="left" valign="top">
267 <tbody>
268 <tr>
269 <td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
270 <td>
271 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> item.</td>
272 </tr>
273 <tr>
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>
276 </td>
277 </tr>
278 </tbody>
279 </table></div>
280 </div>
281 <hr>
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>
286 <p>
287 Get the system context partof the
288 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a>.
289 </p>
290 <div class="variablelist"><table border="0">
291 <col align="left" valign="top">
292 <tbody>
293 <tr>
294 <td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
295 <td>
296 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> item.</td>
297 </tr>
298 <tr>
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>
301 </td>
302 </tr>
303 </tbody>
304 </table></div>
305 </div>
306 <hr>
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>
311 <p>
312 Copies a GList of <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> items.
313 </p>
314 <div class="variablelist"><table border="0">
315 <col align="left" valign="top">
316 <tbody>
317 <tr>
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>
320 </tr>
321 <tr>
322 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
323 <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>
325 </td>
326 </tr>
327 </tbody>
328 </table></div>
329 </div>
330 <hr>
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>
334 <p>
335 Frees all items and the GList of <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a>.
336 </p>
337 <div class="variablelist"><table border="0">
338 <col align="left" valign="top">
339 <tbody><tr>
340 <td><p><span class="term"><em class="parameter"><code>seclist</code></em> :</span></p></td>
341 <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>
343 </td>
344 </tr></tbody>
345 </table></div>
346 </div>
347 <hr>
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>
352 <p>
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
354 "a(ss)".
355 </p>
356 <div class="variablelist"><table border="0">
357 <col align="left" valign="top">
358 <tbody>
359 <tr>
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>
362 </tr>
363 <tr>
364 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
365 <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>
367 </td>
368 </tr>
369 </tbody>
370 </table></div>
371 </div>
372 <hr>
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>
377 <p>
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>
379 items.
380 </p>
381 <div class="variablelist"><table border="0">
382 <col align="left" valign="top">
383 <tbody>
384 <tr>
385 <td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
386 <td>
387 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContextList" title="GSignondSecurityContextList"><span class="type">GSignondSecurityContextList</span></a> item.</td>
388 </tr>
389 <tr>
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>
392 </td>
393 </tr>
394 </tbody>
395 </table></div>
396 </div>
397 <hr>
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>
402 <p>
403 Compare two <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> items match.
404 </p>
405 <div class="variablelist"><table border="0">
406 <col align="left" valign="top">
407 <tbody>
408 <tr>
409 <td><p><span class="term"><em class="parameter"><code>ctx1</code></em> :</span></p></td>
410 <td>first item to compare.</td>
411 </tr>
412 <tr>
413 <td><p><span class="term"><em class="parameter"><code>ctx2</code></em> :</span></p></td>
414 <td>second item to compare.</td>
415 </tr>
416 <tr>
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>
422 </tr>
423 </tbody>
424 </table></div>
425 </div>
426 <hr>
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>
430 <p>
431 Allocates a new security context item. System and app context are empty strings.
432 </p>
433 <div class="variablelist"><table border="0">
434 <col align="left" valign="top">
435 <tbody><tr>
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>
438 </td>
439 </tr></tbody>
440 </table></div>
441 </div>
442 <hr>
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>
448 <p>
449 Allocates and initializes a new security context item.
450 </p>
451 <div class="variablelist"><table border="0">
452 <col align="left" valign="top">
453 <tbody>
454 <tr>
455 <td><p><span class="term"><em class="parameter"><code>system_context</code></em> :</span></p></td>
456 <td>system security context</td>
457 </tr>
458 <tr>
459 <td><p><span class="term"><em class="parameter"><code>application_context</code></em> :</span></p></td>
460 <td>application security context</td>
461 </tr>
462 <tr>
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>
465 </td>
466 </tr>
467 </tbody>
468 </table></div>
469 </div>
470 <hr>
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>
476 <p>
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>.
479 </p>
480 <div class="variablelist"><table border="0">
481 <col align="left" valign="top">
482 <tbody>
483 <tr>
484 <td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
485 <td>
486 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> item.</td>
487 </tr>
488 <tr>
489 <td><p><span class="term"><em class="parameter"><code>application_context</code></em> :</span></p></td>
490 <td>application security context.</td>
491 </tr>
492 </tbody>
493 </table></div>
494 </div>
495 <hr>
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>
501 <p>
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>.
504 </p>
505 <div class="variablelist"><table border="0">
506 <col align="left" valign="top">
507 <tbody>
508 <tr>
509 <td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
510 <td>
511 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> item.</td>
512 </tr>
513 <tr>
514 <td><p><span class="term"><em class="parameter"><code>system_context</code></em> :</span></p></td>
515 <td>system security context.</td>
516 </tr>
517 </tbody>
518 </table></div>
519 </div>
520 <hr>
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>
525 <p>
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.
527 </p>
528 <div class="variablelist"><table border="0">
529 <col align="left" valign="top">
530 <tbody>
531 <tr>
532 <td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
533 <td>
534 <a class="link" href="gsignond-GSignondSecurityContext.html#GSignondSecurityContext" title="GSignondSecurityContext"><span class="type">GSignondSecurityContext</span></a> item.</td>
535 </tr>
536 <tr>
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>
539 </td>
540 </tr>
541 </tbody>
542 </table></div>
543 </div>
544 </div>
545 </div>
546 <div class="footer">
547 <hr>
548           Generated by GTK-Doc V1.19.1</div>
549 </body>
550 </html>