| 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>SELinux policy management: OSTree API references</title> |
| 6 | <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"> |
| 7 | <link rel="home" href="index.html" title="OSTree API references"> |
| 8 | <link rel="up" href="reference.html" title="API Reference"> |
| 9 | <link rel="prev" href="ostree-Progress-notification-system-for-asynchronous-operations.html" title="Progress notification system for asynchronous operations"> |
| 10 | <link rel="next" href="ostree-Simple-upgrade-class.html" title="Simple upgrade class"> |
| 11 | <meta name="generator" content="GTK-Doc V1.34.0 (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="5"><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="#ostree-SELinux-policy-management.description" class="shortcut">Description</a></span> |
| 19 | </td> |
| 20 | <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> |
| 21 | <td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> |
| 22 | <td><a accesskey="p" href="ostree-Progress-notification-system-for-asynchronous-operations.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> |
| 23 | <td><a accesskey="n" href="ostree-Simple-upgrade-class.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> |
| 24 | </tr></table> |
| 25 | <div class="refentry"> |
| 26 | <a name="ostree-SELinux-policy-management"></a><div class="titlepage"></div> |
| 27 | <div class="refnamediv"><table width="100%"><tr> |
| 28 | <td valign="top"> |
| 29 | <h2><span class="refentrytitle"><a name="ostree-SELinux-policy-management.top_of_page"></a>SELinux policy management</span></h2> |
| 30 | <p>SELinux policy management — Read SELinux policy and manage filesystem labels</p> |
| 31 | </td> |
| 32 | <td class="gallery_image" valign="top" align="right"></td> |
| 33 | </tr></table></div> |
| 34 | <div class="refsect1"> |
| 35 | <a name="ostree-SELinux-policy-management.functions"></a><h2>Functions</h2> |
| 36 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 37 | <colgroup> |
| 38 | <col width="150px" class="functions_proto_type"> |
| 39 | <col class="functions_proto_name"> |
| 40 | </colgroup> |
| 41 | <tbody> |
| 42 | <tr> |
| 43 | <td class="function_type"> |
| 44 | <a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="returnvalue">OstreeSePolicy</span></a> * |
| 45 | </td> |
| 46 | <td class="function_name"> |
| 47 | <a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-new" title="ostree_sepolicy_new ()">ostree_sepolicy_new</a> <span class="c_punctuation">()</span> |
| 48 | </td> |
| 49 | </tr> |
| 50 | <tr> |
| 51 | <td class="function_type"> |
| 52 | <a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="returnvalue">OstreeSePolicy</span></a> * |
| 53 | </td> |
| 54 | <td class="function_name"> |
| 55 | <a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-new-at" title="ostree_sepolicy_new_at ()">ostree_sepolicy_new_at</a> <span class="c_punctuation">()</span> |
| 56 | </td> |
| 57 | </tr> |
| 58 | <tr> |
| 59 | <td class="function_type"> |
| 60 | <a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="returnvalue">OstreeSePolicy</span></a> * |
| 61 | </td> |
| 62 | <td class="function_name"> |
| 63 | <a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-new-from-commit" title="ostree_sepolicy_new_from_commit ()">ostree_sepolicy_new_from_commit</a> <span class="c_punctuation">()</span> |
| 64 | </td> |
| 65 | </tr> |
| 66 | <tr> |
| 67 | <td class="function_type"> |
| 68 | <span class="returnvalue">GFile</span> * |
| 69 | </td> |
| 70 | <td class="function_name"> |
| 71 | <a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-get-path" title="ostree_sepolicy_get_path ()">ostree_sepolicy_get_path</a> <span class="c_punctuation">()</span> |
| 72 | </td> |
| 73 | </tr> |
| 74 | <tr> |
| 75 | <td class="function_type">const <span class="returnvalue">char</span> * |
| 76 | </td> |
| 77 | <td class="function_name"> |
| 78 | <a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-get-name" title="ostree_sepolicy_get_name ()">ostree_sepolicy_get_name</a> <span class="c_punctuation">()</span> |
| 79 | </td> |
| 80 | </tr> |
| 81 | <tr> |
| 82 | <td class="function_type"> |
| 83 | <span class="returnvalue">gboolean</span> |
| 84 | </td> |
| 85 | <td class="function_name"> |
| 86 | <a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-get-label" title="ostree_sepolicy_get_label ()">ostree_sepolicy_get_label</a> <span class="c_punctuation">()</span> |
| 87 | </td> |
| 88 | </tr> |
| 89 | <tr> |
| 90 | <td class="function_type">const <span class="returnvalue">char</span> * |
| 91 | </td> |
| 92 | <td class="function_name"> |
| 93 | <a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-get-csum" title="ostree_sepolicy_get_csum ()">ostree_sepolicy_get_csum</a> <span class="c_punctuation">()</span> |
| 94 | </td> |
| 95 | </tr> |
| 96 | <tr> |
| 97 | <td class="function_type"> |
| 98 | <span class="returnvalue">gboolean</span> |
| 99 | </td> |
| 100 | <td class="function_name"> |
| 101 | <a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-restorecon" title="ostree_sepolicy_restorecon ()">ostree_sepolicy_restorecon</a> <span class="c_punctuation">()</span> |
| 102 | </td> |
| 103 | </tr> |
| 104 | <tr> |
| 105 | <td class="function_type"> |
| 106 | <span class="returnvalue">gboolean</span> |
| 107 | </td> |
| 108 | <td class="function_name"> |
| 109 | <a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-setfscreatecon" title="ostree_sepolicy_setfscreatecon ()">ostree_sepolicy_setfscreatecon</a> <span class="c_punctuation">()</span> |
| 110 | </td> |
| 111 | </tr> |
| 112 | <tr> |
| 113 | <td class="function_type"> |
| 114 | <span class="returnvalue">void</span> |
| 115 | </td> |
| 116 | <td class="function_name"> |
| 117 | <a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-fscreatecon-cleanup" title="ostree_sepolicy_fscreatecon_cleanup ()">ostree_sepolicy_fscreatecon_cleanup</a> <span class="c_punctuation">()</span> |
| 118 | </td> |
| 119 | </tr> |
| 120 | <tr> |
| 121 | <td class="function_type"> |
| 122 | <span class="returnvalue">void</span> |
| 123 | </td> |
| 124 | <td class="function_name"> |
| 125 | <a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-set-null-log" title="ostree_sepolicy_set_null_log ()">ostree_sepolicy_set_null_log</a> <span class="c_punctuation">()</span> |
| 126 | </td> |
| 127 | </tr> |
| 128 | </tbody> |
| 129 | </table></div> |
| 130 | </div> |
| 131 | <div class="refsect1"> |
| 132 | <a name="ostree-SELinux-policy-management.other"></a><h2>Types and Values</h2> |
| 133 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 134 | <colgroup> |
| 135 | <col width="150px" class="other_proto_type"> |
| 136 | <col class="other_proto_name"> |
| 137 | </colgroup> |
| 138 | <tbody> |
| 139 | <tr> |
| 140 | <td class="typedef_keyword">typedef</td> |
| 141 | <td class="function_name"><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy">OstreeSePolicy</a></td> |
| 142 | </tr> |
| 143 | <tr> |
| 144 | <td class="datatype_keyword">enum</td> |
| 145 | <td class="function_name"><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicyRestoreconFlags" title="enum OstreeSePolicyRestoreconFlags">OstreeSePolicyRestoreconFlags</a></td> |
| 146 | </tr> |
| 147 | </tbody> |
| 148 | </table></div> |
| 149 | </div> |
| 150 | <div class="refsect1"> |
| 151 | <a name="ostree-SELinux-policy-management.description"></a><h2>Description</h2> |
| 152 | <p>A <a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="type">OstreeSePolicy</span></a> object can load the SELinux policy from a given |
| 153 | root and perform labeling.</p> |
| 154 | </div> |
| 155 | <div class="refsect1"> |
| 156 | <a name="ostree-SELinux-policy-management.functions_details"></a><h2>Functions</h2> |
| 157 | <div class="refsect2"> |
| 158 | <a name="ostree-sepolicy-new"></a><h3>ostree_sepolicy_new ()</h3> |
| 159 | <pre class="programlisting"><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="returnvalue">OstreeSePolicy</span></a> * |
| 160 | ostree_sepolicy_new (<em class="parameter"><code><span class="type">GFile</span> *path</code></em>, |
| 161 | <em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>, |
| 162 | <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> |
| 163 | <div class="refsect3"> |
| 164 | <a name="ostree-sepolicy-new.parameters"></a><h4>Parameters</h4> |
| 165 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 166 | <colgroup> |
| 167 | <col width="150px" class="parameters_name"> |
| 168 | <col class="parameters_description"> |
| 169 | <col width="200px" class="parameters_annotations"> |
| 170 | </colgroup> |
| 171 | <tbody> |
| 172 | <tr> |
| 173 | <td class="parameter_name"><p>path</p></td> |
| 174 | <td class="parameter_description"><p>Path to a root directory</p></td> |
| 175 | <td class="parameter_annotations"> </td> |
| 176 | </tr> |
| 177 | <tr> |
| 178 | <td class="parameter_name"><p>cancellable</p></td> |
| 179 | <td class="parameter_description"><p>Cancellable</p></td> |
| 180 | <td class="parameter_annotations"> </td> |
| 181 | </tr> |
| 182 | <tr> |
| 183 | <td class="parameter_name"><p>error</p></td> |
| 184 | <td class="parameter_description"><p>Error</p></td> |
| 185 | <td class="parameter_annotations"> </td> |
| 186 | </tr> |
| 187 | </tbody> |
| 188 | </table></div> |
| 189 | </div> |
| 190 | <div class="refsect3"> |
| 191 | <a name="ostree-sepolicy-new.returns"></a><h4>Returns</h4> |
| 192 | <p>An accessor object for SELinux policy in root located at <em class="parameter"><code>path</code></em> |
| 193 | . </p> |
| 194 | <p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> |
| 195 | </div> |
| 196 | </div> |
| 197 | <hr> |
| 198 | <div class="refsect2"> |
| 199 | <a name="ostree-sepolicy-new-at"></a><h3>ostree_sepolicy_new_at ()</h3> |
| 200 | <pre class="programlisting"><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="returnvalue">OstreeSePolicy</span></a> * |
| 201 | ostree_sepolicy_new_at (<em class="parameter"><code><span class="type">int</span> rootfs_dfd</code></em>, |
| 202 | <em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>, |
| 203 | <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> |
| 204 | <div class="refsect3"> |
| 205 | <a name="ostree-sepolicy-new-at.parameters"></a><h4>Parameters</h4> |
| 206 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 207 | <colgroup> |
| 208 | <col width="150px" class="parameters_name"> |
| 209 | <col class="parameters_description"> |
| 210 | <col width="200px" class="parameters_annotations"> |
| 211 | </colgroup> |
| 212 | <tbody> |
| 213 | <tr> |
| 214 | <td class="parameter_name"><p>rootfs_dfd</p></td> |
| 215 | <td class="parameter_description"><p>Directory fd for rootfs (will not be cloned)</p></td> |
| 216 | <td class="parameter_annotations"> </td> |
| 217 | </tr> |
| 218 | <tr> |
| 219 | <td class="parameter_name"><p>cancellable</p></td> |
| 220 | <td class="parameter_description"><p>Cancellable</p></td> |
| 221 | <td class="parameter_annotations"> </td> |
| 222 | </tr> |
| 223 | <tr> |
| 224 | <td class="parameter_name"><p>error</p></td> |
| 225 | <td class="parameter_description"><p>Error</p></td> |
| 226 | <td class="parameter_annotations"> </td> |
| 227 | </tr> |
| 228 | </tbody> |
| 229 | </table></div> |
| 230 | </div> |
| 231 | <div class="refsect3"> |
| 232 | <a name="ostree-sepolicy-new-at.returns"></a><h4>Returns</h4> |
| 233 | <p>An accessor object for SELinux policy in root located at <em class="parameter"><code>rootfs_dfd</code></em> |
| 234 | . </p> |
| 235 | <p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> |
| 236 | </div> |
| 237 | <p class="since">Since: 2017.4</p> |
| 238 | </div> |
| 239 | <hr> |
| 240 | <div class="refsect2"> |
| 241 | <a name="ostree-sepolicy-new-from-commit"></a><h3>ostree_sepolicy_new_from_commit ()</h3> |
| 242 | <pre class="programlisting"><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="returnvalue">OstreeSePolicy</span></a> * |
| 243 | ostree_sepolicy_new_from_commit (<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *repo</code></em>, |
| 244 | <em class="parameter"><code>const <span class="type">char</span> *rev</code></em>, |
| 245 | <em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>, |
| 246 | <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> |
| 247 | <p>Extract the SELinux policy from a commit object via a partial checkout. This is useful |
| 248 | for labeling derived content as separate commits.</p> |
| 249 | <p>This function is the backend of <code class="literal"><a class="link" href="ostree-OstreeRepo.html#ostree-repo-commit-modifier-set-sepolicy-from-commit" title="ostree_repo_commit_modifier_set_sepolicy_from_commit ()"><code class="function">ostree_repo_commit_modifier_set_sepolicy_from_commit()</code></a></code>.</p> |
| 250 | <div class="refsect3"> |
| 251 | <a name="ostree-sepolicy-new-from-commit.parameters"></a><h4>Parameters</h4> |
| 252 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 253 | <colgroup> |
| 254 | <col width="150px" class="parameters_name"> |
| 255 | <col class="parameters_description"> |
| 256 | <col width="200px" class="parameters_annotations"> |
| 257 | </colgroup> |
| 258 | <tbody> |
| 259 | <tr> |
| 260 | <td class="parameter_name"><p>repo</p></td> |
| 261 | <td class="parameter_description"><p>The repo</p></td> |
| 262 | <td class="parameter_annotations"> </td> |
| 263 | </tr> |
| 264 | <tr> |
| 265 | <td class="parameter_name"><p>rev</p></td> |
| 266 | <td class="parameter_description"><p>ostree ref or checksum</p></td> |
| 267 | <td class="parameter_annotations"> </td> |
| 268 | </tr> |
| 269 | <tr> |
| 270 | <td class="parameter_name"><p>cancellable</p></td> |
| 271 | <td class="parameter_description"><p>Cancellable</p></td> |
| 272 | <td class="parameter_annotations"> </td> |
| 273 | </tr> |
| 274 | <tr> |
| 275 | <td class="parameter_name"><p>error</p></td> |
| 276 | <td class="parameter_description"><p>Error</p></td> |
| 277 | <td class="parameter_annotations"> </td> |
| 278 | </tr> |
| 279 | </tbody> |
| 280 | </table></div> |
| 281 | </div> |
| 282 | <div class="refsect3"> |
| 283 | <a name="ostree-sepolicy-new-from-commit.returns"></a><h4>Returns</h4> |
| 284 | <p>A new policy. </p> |
| 285 | <p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> |
| 286 | </div> |
| 287 | </div> |
| 288 | <hr> |
| 289 | <div class="refsect2"> |
| 290 | <a name="ostree-sepolicy-get-path"></a><h3>ostree_sepolicy_get_path ()</h3> |
| 291 | <pre class="programlisting"><span class="returnvalue">GFile</span> * |
| 292 | ostree_sepolicy_get_path (<em class="parameter"><code><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="type">OstreeSePolicy</span></a> *self</code></em>);</pre> |
| 293 | <p>This API should be considered deprecated, because it's supported for |
| 294 | policy objects to be created from file-descriptor relative paths, which |
| 295 | may not be globally accessible.</p> |
| 296 | <div class="refsect3"> |
| 297 | <a name="ostree-sepolicy-get-path.parameters"></a><h4>Parameters</h4> |
| 298 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 299 | <colgroup> |
| 300 | <col width="150px" class="parameters_name"> |
| 301 | <col class="parameters_description"> |
| 302 | <col width="200px" class="parameters_annotations"> |
| 303 | </colgroup> |
| 304 | <tbody><tr> |
| 305 | <td class="parameter_name"><p>self</p></td> |
| 306 | <td class="parameter_description"><p>A SePolicy object</p></td> |
| 307 | <td class="parameter_annotations"> </td> |
| 308 | </tr></tbody> |
| 309 | </table></div> |
| 310 | </div> |
| 311 | <div class="refsect3"> |
| 312 | <a name="ostree-sepolicy-get-path.returns"></a><h4>Returns</h4> |
| 313 | <p>Path to rootfs. </p> |
| 314 | <p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p> |
| 315 | </div> |
| 316 | </div> |
| 317 | <hr> |
| 318 | <div class="refsect2"> |
| 319 | <a name="ostree-sepolicy-get-name"></a><h3>ostree_sepolicy_get_name ()</h3> |
| 320 | <pre class="programlisting">const <span class="returnvalue">char</span> * |
| 321 | ostree_sepolicy_get_name (<em class="parameter"><code><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="type">OstreeSePolicy</span></a> *self</code></em>);</pre> |
| 322 | <div class="refsect3"> |
| 323 | <a name="ostree-sepolicy-get-name.returns"></a><h4>Returns</h4> |
| 324 | <p>Type of current policy. </p> |
| 325 | <p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p> |
| 326 | </div> |
| 327 | </div> |
| 328 | <hr> |
| 329 | <div class="refsect2"> |
| 330 | <a name="ostree-sepolicy-get-label"></a><h3>ostree_sepolicy_get_label ()</h3> |
| 331 | <pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 332 | ostree_sepolicy_get_label (<em class="parameter"><code><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="type">OstreeSePolicy</span></a> *self</code></em>, |
| 333 | <em class="parameter"><code>const <span class="type">char</span> *relpath</code></em>, |
| 334 | <em class="parameter"><code><span class="type">guint32</span> unix_mode</code></em>, |
| 335 | <em class="parameter"><code><span class="type">char</span> **out_label</code></em>, |
| 336 | <em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>, |
| 337 | <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> |
| 338 | <p>Store in <em class="parameter"><code>out_label</code></em> |
| 339 | the security context for the given <em class="parameter"><code>relpath</code></em> |
| 340 | and |
| 341 | mode <em class="parameter"><code>unix_mode</code></em> |
| 342 | . If the policy does not specify a label, <code class="literal">NULL</code> |
| 343 | will be returned.</p> |
| 344 | <div class="refsect3"> |
| 345 | <a name="ostree-sepolicy-get-label.parameters"></a><h4>Parameters</h4> |
| 346 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 347 | <colgroup> |
| 348 | <col width="150px" class="parameters_name"> |
| 349 | <col class="parameters_description"> |
| 350 | <col width="200px" class="parameters_annotations"> |
| 351 | </colgroup> |
| 352 | <tbody> |
| 353 | <tr> |
| 354 | <td class="parameter_name"><p>self</p></td> |
| 355 | <td class="parameter_description"><p>Self</p></td> |
| 356 | <td class="parameter_annotations"> </td> |
| 357 | </tr> |
| 358 | <tr> |
| 359 | <td class="parameter_name"><p>relpath</p></td> |
| 360 | <td class="parameter_description"><p>Path</p></td> |
| 361 | <td class="parameter_annotations"> </td> |
| 362 | </tr> |
| 363 | <tr> |
| 364 | <td class="parameter_name"><p>unix_mode</p></td> |
| 365 | <td class="parameter_description"><p>Unix mode</p></td> |
| 366 | <td class="parameter_annotations"> </td> |
| 367 | </tr> |
| 368 | <tr> |
| 369 | <td class="parameter_name"><p>out_label</p></td> |
| 370 | <td class="parameter_description"><p>Return location for security context. </p></td> |
| 371 | <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td> |
| 372 | </tr> |
| 373 | <tr> |
| 374 | <td class="parameter_name"><p>cancellable</p></td> |
| 375 | <td class="parameter_description"><p>Cancellable</p></td> |
| 376 | <td class="parameter_annotations"> </td> |
| 377 | </tr> |
| 378 | <tr> |
| 379 | <td class="parameter_name"><p>error</p></td> |
| 380 | <td class="parameter_description"><p>Error</p></td> |
| 381 | <td class="parameter_annotations"> </td> |
| 382 | </tr> |
| 383 | </tbody> |
| 384 | </table></div> |
| 385 | </div> |
| 386 | </div> |
| 387 | <hr> |
| 388 | <div class="refsect2"> |
| 389 | <a name="ostree-sepolicy-get-csum"></a><h3>ostree_sepolicy_get_csum ()</h3> |
| 390 | <pre class="programlisting">const <span class="returnvalue">char</span> * |
| 391 | ostree_sepolicy_get_csum (<em class="parameter"><code><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="type">OstreeSePolicy</span></a> *self</code></em>);</pre> |
| 392 | <div class="refsect3"> |
| 393 | <a name="ostree-sepolicy-get-csum.returns"></a><h4>Returns</h4> |
| 394 | <p>Checksum of current policy. </p> |
| 395 | <p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p> |
| 396 | </div> |
| 397 | <p class="since">Since: 2016.5</p> |
| 398 | </div> |
| 399 | <hr> |
| 400 | <div class="refsect2"> |
| 401 | <a name="ostree-sepolicy-restorecon"></a><h3>ostree_sepolicy_restorecon ()</h3> |
| 402 | <pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 403 | ostree_sepolicy_restorecon (<em class="parameter"><code><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="type">OstreeSePolicy</span></a> *self</code></em>, |
| 404 | <em class="parameter"><code>const <span class="type">char</span> *path</code></em>, |
| 405 | <em class="parameter"><code><span class="type">GFileInfo</span> *info</code></em>, |
| 406 | <em class="parameter"><code><span class="type">GFile</span> *target</code></em>, |
| 407 | <em class="parameter"><code><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicyRestoreconFlags" title="enum OstreeSePolicyRestoreconFlags"><span class="type">OstreeSePolicyRestoreconFlags</span></a> flags</code></em>, |
| 408 | <em class="parameter"><code><span class="type">char</span> **out_new_label</code></em>, |
| 409 | <em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>, |
| 410 | <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> |
| 411 | <p>Reset the security context of <em class="parameter"><code>target</code></em> |
| 412 | based on the SELinux policy.</p> |
| 413 | <div class="refsect3"> |
| 414 | <a name="ostree-sepolicy-restorecon.parameters"></a><h4>Parameters</h4> |
| 415 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 416 | <colgroup> |
| 417 | <col width="150px" class="parameters_name"> |
| 418 | <col class="parameters_description"> |
| 419 | <col width="200px" class="parameters_annotations"> |
| 420 | </colgroup> |
| 421 | <tbody> |
| 422 | <tr> |
| 423 | <td class="parameter_name"><p>self</p></td> |
| 424 | <td class="parameter_description"><p>Self</p></td> |
| 425 | <td class="parameter_annotations"> </td> |
| 426 | </tr> |
| 427 | <tr> |
| 428 | <td class="parameter_name"><p>path</p></td> |
| 429 | <td class="parameter_description"><p>Path string to use for policy lookup</p></td> |
| 430 | <td class="parameter_annotations"> </td> |
| 431 | </tr> |
| 432 | <tr> |
| 433 | <td class="parameter_name"><p>info</p></td> |
| 434 | <td class="parameter_description"><p>File attributes. </p></td> |
| 435 | <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> |
| 436 | </tr> |
| 437 | <tr> |
| 438 | <td class="parameter_name"><p>target</p></td> |
| 439 | <td class="parameter_description"><p>Physical path to target file</p></td> |
| 440 | <td class="parameter_annotations"> </td> |
| 441 | </tr> |
| 442 | <tr> |
| 443 | <td class="parameter_name"><p>flags</p></td> |
| 444 | <td class="parameter_description"><p>Flags controlling behavior</p></td> |
| 445 | <td class="parameter_annotations"> </td> |
| 446 | </tr> |
| 447 | <tr> |
| 448 | <td class="parameter_name"><p>out_new_label</p></td> |
| 449 | <td class="parameter_description"><p>New label, or <code class="literal">NULL</code> if unchanged. </p></td> |
| 450 | <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>][<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td> |
| 451 | </tr> |
| 452 | <tr> |
| 453 | <td class="parameter_name"><p>cancellable</p></td> |
| 454 | <td class="parameter_description"><p>Cancellable</p></td> |
| 455 | <td class="parameter_annotations"> </td> |
| 456 | </tr> |
| 457 | <tr> |
| 458 | <td class="parameter_name"><p>error</p></td> |
| 459 | <td class="parameter_description"><p>Error</p></td> |
| 460 | <td class="parameter_annotations"> </td> |
| 461 | </tr> |
| 462 | </tbody> |
| 463 | </table></div> |
| 464 | </div> |
| 465 | </div> |
| 466 | <hr> |
| 467 | <div class="refsect2"> |
| 468 | <a name="ostree-sepolicy-setfscreatecon"></a><h3>ostree_sepolicy_setfscreatecon ()</h3> |
| 469 | <pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 470 | ostree_sepolicy_setfscreatecon (<em class="parameter"><code><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="type">OstreeSePolicy</span></a> *self</code></em>, |
| 471 | <em class="parameter"><code>const <span class="type">char</span> *path</code></em>, |
| 472 | <em class="parameter"><code><span class="type">guint32</span> mode</code></em>, |
| 473 | <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> |
| 474 | <div class="refsect3"> |
| 475 | <a name="ostree-sepolicy-setfscreatecon.parameters"></a><h4>Parameters</h4> |
| 476 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 477 | <colgroup> |
| 478 | <col width="150px" class="parameters_name"> |
| 479 | <col class="parameters_description"> |
| 480 | <col width="200px" class="parameters_annotations"> |
| 481 | </colgroup> |
| 482 | <tbody> |
| 483 | <tr> |
| 484 | <td class="parameter_name"><p>self</p></td> |
| 485 | <td class="parameter_description"><p>Policy</p></td> |
| 486 | <td class="parameter_annotations"> </td> |
| 487 | </tr> |
| 488 | <tr> |
| 489 | <td class="parameter_name"><p>path</p></td> |
| 490 | <td class="parameter_description"><p>Use this path to determine a label</p></td> |
| 491 | <td class="parameter_annotations"> </td> |
| 492 | </tr> |
| 493 | <tr> |
| 494 | <td class="parameter_name"><p>mode</p></td> |
| 495 | <td class="parameter_description"><p>Used along with <em class="parameter"><code>path</code></em> |
| 496 | </p></td> |
| 497 | <td class="parameter_annotations"> </td> |
| 498 | </tr> |
| 499 | <tr> |
| 500 | <td class="parameter_name"><p>error</p></td> |
| 501 | <td class="parameter_description"><p>Error</p></td> |
| 502 | <td class="parameter_annotations"> </td> |
| 503 | </tr> |
| 504 | </tbody> |
| 505 | </table></div> |
| 506 | </div> |
| 507 | </div> |
| 508 | <hr> |
| 509 | <div class="refsect2"> |
| 510 | <a name="ostree-sepolicy-fscreatecon-cleanup"></a><h3>ostree_sepolicy_fscreatecon_cleanup ()</h3> |
| 511 | <pre class="programlisting"><span class="returnvalue">void</span> |
| 512 | ostree_sepolicy_fscreatecon_cleanup (<em class="parameter"><code><span class="type">void</span> **unused</code></em>);</pre> |
| 513 | <p>Cleanup function for <a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-setfscreatecon" title="ostree_sepolicy_setfscreatecon ()"><code class="function">ostree_sepolicy_setfscreatecon()</code></a>.</p> |
| 514 | <div class="refsect3"> |
| 515 | <a name="ostree-sepolicy-fscreatecon-cleanup.parameters"></a><h4>Parameters</h4> |
| 516 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 517 | <colgroup> |
| 518 | <col width="150px" class="parameters_name"> |
| 519 | <col class="parameters_description"> |
| 520 | <col width="200px" class="parameters_annotations"> |
| 521 | </colgroup> |
| 522 | <tbody><tr> |
| 523 | <td class="parameter_name"><p>unused</p></td> |
| 524 | <td class="parameter_description"><p>Not used, just in case you didn't infer that from the parameter name</p></td> |
| 525 | <td class="parameter_annotations"> </td> |
| 526 | </tr></tbody> |
| 527 | </table></div> |
| 528 | </div> |
| 529 | </div> |
| 530 | <hr> |
| 531 | <div class="refsect2"> |
| 532 | <a name="ostree-sepolicy-set-null-log"></a><h3>ostree_sepolicy_set_null_log ()</h3> |
| 533 | <pre class="programlisting"><span class="returnvalue">void</span> |
| 534 | ostree_sepolicy_set_null_log (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> |
| 535 | <p class="since">Since: 2025.2</p> |
| 536 | </div> |
| 537 | </div> |
| 538 | <div class="refsect1"> |
| 539 | <a name="ostree-SELinux-policy-management.other_details"></a><h2>Types and Values</h2> |
| 540 | <div class="refsect2"> |
| 541 | <a name="OstreeSePolicy"></a><h3>OstreeSePolicy</h3> |
| 542 | <pre class="programlisting">typedef struct OstreeSePolicy OstreeSePolicy; |
| 543 | </pre> |
| 544 | </div> |
| 545 | <hr> |
| 546 | <div class="refsect2"> |
| 547 | <a name="OstreeSePolicyRestoreconFlags"></a><h3>enum OstreeSePolicyRestoreconFlags</h3> |
| 548 | <div class="refsect3"> |
| 549 | <a name="OstreeSePolicyRestoreconFlags.members"></a><h4>Members</h4> |
| 550 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 551 | <colgroup> |
| 552 | <col width="300px" class="enum_members_name"> |
| 553 | <col class="enum_members_description"> |
| 554 | <col width="200px" class="enum_members_annotations"> |
| 555 | </colgroup> |
| 556 | <tbody> |
| 557 | <tr> |
| 558 | <td class="enum_member_name"><p><a name="OSTREE-SEPOLICY-RESTORECON-FLAGS-NONE:CAPS"></a>OSTREE_SEPOLICY_RESTORECON_FLAGS_NONE</p></td> |
| 559 | <td> </td> |
| 560 | <td> </td> |
| 561 | </tr> |
| 562 | <tr> |
| 563 | <td class="enum_member_name"><p><a name="OSTREE-SEPOLICY-RESTORECON-FLAGS-ALLOW-NOLABEL:CAPS"></a>OSTREE_SEPOLICY_RESTORECON_FLAGS_ALLOW_NOLABEL</p></td> |
| 564 | <td> </td> |
| 565 | <td> </td> |
| 566 | </tr> |
| 567 | <tr> |
| 568 | <td class="enum_member_name"><p><a name="OSTREE-SEPOLICY-RESTORECON-FLAGS-KEEP-EXISTING:CAPS"></a>OSTREE_SEPOLICY_RESTORECON_FLAGS_KEEP_EXISTING</p></td> |
| 569 | <td> </td> |
| 570 | <td> </td> |
| 571 | </tr> |
| 572 | </tbody> |
| 573 | </table></div> |
| 574 | </div> |
| 575 | </div> |
| 576 | </div> |
| 577 | </div> |
| 578 | <div class="footer"> |
| 579 | <hr>Generated by GTK-Doc V1.34.0</div> |
| 580 | </body> |
| 581 | </html> |