1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>register_security</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="The Linux Kernel API"><link rel="up" href="security.html" title="Chapter&#160;11.&#160;Security Framework"><link rel="prev" href="API-security-module-enable.html" title="security_module_enable"><link rel="next" href="API-securityfs-create-file.html" title="securityfs_create_file"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">register_security</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-security-module-enable.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;11.&#160;Security Framework</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-securityfs-create-file.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-register-security"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>register_security &#8212; 
2     registers a security framework with the kernel
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">register_security </b>(</code></td><td>struct security_operations * <var class="pdparam">ops</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1127428036"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>ops</code></em></span></dt><dd><p>
4     a pointer to the struct security_options that is to be registered
5    </p></dd></dl></div></div><div class="refsect1"><a name="idp1127429684"></a><h2>Description</h2><p>
6   This function allows a security module to register itself with the
7   kernel security subsystem.  Some rudimentary checking is done on the <em class="parameter"><code>ops</code></em>
8   value passed to this function. You'll need to check first if your LSM
9   is allowed to register its <em class="parameter"><code>ops</code></em> by calling security_module_enable(<em class="parameter"><code>ops</code></em>).
10   </p><p>
11
12   If there is already a security module registered with the kernel,
13   an error will be returned.  Otherwise <code class="constant">0</code> is returned on success.
14</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-security-module-enable.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="security.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-securityfs-create-file.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">security_module_enable</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span class="phrase">securityfs_create_file</span></td></tr></table></div></body></html>
15