Sophie

Sophie

distrib > CentOS > 6 > i386 > by-pkgid > 2c51d8eb79f8810ada971ee8c30ce1e5 > files > 2480

kernel-doc-2.6.32-71.14.1.el6.noarch.rpm

<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>LSM Capabilities Module</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="Linux Security Modules: General Security Hooks for Linux" /><link rel="up" href="index.html" title="Linux Security Modules: General Security Hooks for Linux" /><link rel="prev" href="ar01s02.html" title="LSM Framework" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">LSM Capabilities Module</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s02.html">Prev</a>&#160;</td><th width="60%" align="center">&#160;</th><td width="20%" align="right">&#160;</td></tr></table><hr /></div><div class="sect1" title="LSM Capabilities Module"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="cap"></a>LSM Capabilities Module</h2></div></div></div><p>
The LSM kernel patch moves most of the existing POSIX.1e capabilities
logic into an optional security module stored in the file
<code class="filename">security/capability.c</code>.  This change allows
users who do not want to use capabilities to omit this code entirely
from their kernel, instead using the dummy module for traditional
superuser logic or any other module that they desire.  This change
also allows the developers of the capabilities logic to maintain and
enhance their code more freely, without needing to integrate patches
back into the base kernel.
</p><p>
In addition to moving the capabilities logic, the LSM kernel patch
could move the capability-related fields from the kernel data
structures into the new security fields managed by the security
modules.  However, at present, the LSM kernel patch leaves the
capability fields in the kernel data structures.  In his original
remarks, Linus suggested that this might be preferable so that other
security modules can be easily stacked with the capabilities module
without needing to chain multiple security structures on the security field.
It also avoids imposing extra overhead on the capabilities module
to manage the security fields.  However, the LSM framework could
certainly support such a move if it is determined to be desirable,
with only a few additional changes described below.
</p><p>
At present, the capabilities logic for computing process capabilities
on <code class="function">execve</code> and <code class="function">set*uid</code>,
checking capabilities for a particular process, saving and checking
capabilities for netlink messages, and handling the
<code class="function">capget</code> and <code class="function">capset</code> system
calls have been moved into the capabilities module.  There are still a
few locations in the base kernel where capability-related fields are
directly examined or modified, but the current version of the LSM
patch does allow a security module to completely replace the
assignment and testing of capabilities.  These few locations would
need to be changed if the capability-related fields were moved into
the security field.  The following is a list of known locations that
still perform such direct examination or modification of
capability-related fields:
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><code class="filename">fs/open.c</code>:<code class="function">sys_access</code></p></li><li class="listitem"><p><code class="filename">fs/lockd/host.c</code>:<code class="function">nlm_bind_host</code></p></li><li class="listitem"><p><code class="filename">fs/nfsd/auth.c</code>:<code class="function">nfsd_setuser</code></p></li><li class="listitem"><p><code class="filename">fs/proc/array.c</code>:<code class="function">task_cap</code></p></li></ul></div><p>
</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s02.html">Prev</a>&#160;</td><td width="20%" align="center">&#160;</td><td width="40%" align="right">&#160;</td></tr><tr><td width="40%" align="left" valign="top">LSM Framework&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;</td></tr></table></div></body></html>