利用SELinux增强Linux安全性
1. 查看进程安全上下文
要查看进程的安全上下文,需要在 ps 命令中使用 -Z 选项。以下示例使用 ps -eZ 命令,然后通过管道将结果传递给 grep ,以仅搜索运行 bash shell的进程:
# ps -eZ | grep bash
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 1589 pts/
0 00:00:00 bash
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 5289 pts/
1 00:00:00 bash
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 5350 pts/
1 00:00:00 bash
进程上下文列表显示以下内容:
- 用户(user) :进程映射到SELinux的 unconfined_u 用户。
- 角色(role) :进程以 unconfined_r 角色运行。
- 类型(type) :进程在 unconfined_t 域中运行。
超级会员免费看
订阅专栏 解锁全文
41

被折叠的 条评论
为什么被折叠?



