SMACK简介

来源:互联网 发布:java mvc框架下载 编辑:程序博客网 时间:2024/06/05 18:44

原文链接:http://schaufler-ca.com/description_from_the_linux_source_tree

Smack is the the Simplified Mandatory Access Control Kernel.
Smack是一个基于内核实现的强制访问控制机制,简单性是其主要设计目标。
Smack包括三个主要部件:
- 内核
- 基本工具(非常有用,但不是必须的)
- 配置数据


Smack的核心组件被实现为一个Linux的安全模块(LSM).Smack运行的前提条件是系统要求具有网络标识,以及支持扩展属性的文件系统,
Smack术语


Subject: subject是一个任务,是基本的执行单元

Object:各种类型的文件,IPC,任务也可以是Object.

Access: 任何Subject企图从Object获取或传递信息给Object的行为都是Access
Access Modes:
 a: indicates that append access should be granted.
 r: indicates that read access should be granted.
 w: indicates that write access should be granted.
 x: indicates that execute access should be granted.
 t: indicates that the rule requests transmutation.

Access Rules:规则按如下顺序执行
 1. Any access requested by a task labeled "*" is denied.
 2. A read or execute access requested by a task labeled "^"
    is permitted.
 3. A read or execute access requested on an object labeled "_"
    is permitted.
 4. Any access requested on an object labeled "*" is permitted.
 5. Any access requested by a task on an object with the same
    label is permitted.
 6. Any access requested that is explicitly defined in the loaded
    rule set is permitted.
 7. Any other access is denied.
Access Rule Format:
 subject-label object-label access


Label: 用来区别Subject或Object的强制访问控制特点的标识。Smack的label是使用ASCII字母的字符串,其长度在1到23之间。1个字母
的label使用特殊的字符,是给Smack开发团队预留的。Smack的label是无结构的,是大小写敏感的,不包括不可打印字符,不包括斜杠"/",
反斜杠"\"以及单引号"'",双引号'"',Smack的label也不可以以连字符'-'开头。
一下是预先定义的Smack Label:
在Smack系统中每一个任务都被赋予一个label。系统任务例如init(8)和系统守护进程的label是"_".用户任务的label可以从配置文件
/etc/smack/user找到。

0 0
原创粉丝点击