免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
123
最近访问板块 发新帖
楼主: zhunxun
打印 上一主题 下一主题

[内核模块] 求教selinux源代码获取 [复制链接]

论坛徽章:
1
IT运维版块每日发帖之星
日期:2016-07-25 06:20:00
21 [报告]
发表于 2016-05-06 16:01 |只看该作者
唉,一言难尽啊大哥,这只是项目中的一个部分,还有好多,主要是TPM可信计算相关的东西,小弟人微言轻,不敢妄言!!回复 18# SeAL80s


   

论坛徽章:
18
2015年迎新春徽章
日期:2015-03-04 10:16:53操作系统版块每日发帖之星
日期:2016-05-11 06:20:0015-16赛季CBA联赛之佛山
日期:2016-05-06 22:28:4415-16赛季CBA联赛之广夏
日期:2016-04-22 23:24:00操作系统版块每日发帖之星
日期:2016-04-21 06:20:00IT运维版块每周发帖之星
日期:2016-03-07 16:27:44操作系统版块每日发帖之星
日期:2016-02-03 06:20:00IT运维版块每日发帖之星
日期:2016-01-31 06:20:00IT运维版块每日发帖之星
日期:2016-01-30 06:20:00IT运维版块每日发帖之星
日期:2016-01-24 06:20:00IT运维版块每日发帖之星
日期:2016-01-23 06:20:00操作系统版块每日发帖之星
日期:2015-11-26 06:20:00
22 [报告]
发表于 2016-05-06 22:15 |只看该作者
回复 21# zhunxun


    如果一定要在ubuntu上安装selinux,那么这个你是不是看过?可能会有帮助

    h t t p s ://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/SELinux_Users_and_Administrators_Guide/

    h t t p s://www.howtoinstall.co/en/ubuntu/trusty/selinux-policy-ubuntu

    估计你要的是这个
    h t t p s://unix.stackexchange.com/questions/245272/enable-selinux-on-boot

论坛徽章:
18
2015年迎新春徽章
日期:2015-03-04 10:16:53操作系统版块每日发帖之星
日期:2016-05-11 06:20:0015-16赛季CBA联赛之佛山
日期:2016-05-06 22:28:4415-16赛季CBA联赛之广夏
日期:2016-04-22 23:24:00操作系统版块每日发帖之星
日期:2016-04-21 06:20:00IT运维版块每周发帖之星
日期:2016-03-07 16:27:44操作系统版块每日发帖之星
日期:2016-02-03 06:20:00IT运维版块每日发帖之星
日期:2016-01-31 06:20:00IT运维版块每日发帖之星
日期:2016-01-30 06:20:00IT运维版块每日发帖之星
日期:2016-01-24 06:20:00IT运维版块每日发帖之星
日期:2016-01-23 06:20:00操作系统版块每日发帖之星
日期:2015-11-26 06:20:00
23 [报告]
发表于 2016-05-06 22:21 |只看该作者
回复 21# zhunxun

h t t p s://wiki.ubuntu.com/SELinux

没细心看全,貌似ubuntu下的selinux有问题,缺乏维护,官方推荐debian里的包

    How does Ubuntu implements SELinux...?

selinux is not installed or enabled by default. We use apparmor by default. The Ubuntu wiki page for SELinux even claims ...

Warning

The Ubuntu-specific "selinux" and "selinux-policy-ubuntu" packages documented here have not received much attention since Karmic, and appear to be effectively broken in Precise.

If you wish to use SELinux in Ubuntu, the "selinux-basics" and "selinux-policy-default" packages from Debian are still being actively maintained. Documentation relevant to those packages can be found at http://wiki.debian.org/SELinux
but also contains instruction on how to install it:

SELinux in Ubuntu

SELinux can be enabled in Ubuntu by installing the "selinux" meta-package, which will make the needed changes to the system, and install the Tresys policies for Ubuntu:

sudo apt-get install selinux
After installation, you will be prompted to reboot the system to label and activate SELinux.
But it might be smarter to install the debian packages manually...

论坛徽章:
18
2015年迎新春徽章
日期:2015-03-04 10:16:53操作系统版块每日发帖之星
日期:2016-05-11 06:20:0015-16赛季CBA联赛之佛山
日期:2016-05-06 22:28:4415-16赛季CBA联赛之广夏
日期:2016-04-22 23:24:00操作系统版块每日发帖之星
日期:2016-04-21 06:20:00IT运维版块每周发帖之星
日期:2016-03-07 16:27:44操作系统版块每日发帖之星
日期:2016-02-03 06:20:00IT运维版块每日发帖之星
日期:2016-01-31 06:20:00IT运维版块每日发帖之星
日期:2016-01-30 06:20:00IT运维版块每日发帖之星
日期:2016-01-24 06:20:00IT运维版块每日发帖之星
日期:2016-01-23 06:20:00操作系统版块每日发帖之星
日期:2015-11-26 06:20:00
24 [报告]
发表于 2016-05-06 22:27 |只看该作者
本帖最后由 SeAL80s 于 2016-05-06 22:29 编辑

h t t p s ://askubuntu.com/questions/481293/selinux-implementation-in-ubuntu
如果访问网页有问题,直接看下面吧

I believe you have to remove apparmor before installing SELinux:

sudo apt-get remove apparmor
According to the SELinux wiki page:

Starting with Hardy Heron SELinux has been integrated into Ubuntu and can be installed via apt.

Install the selinux package:

sudo apt-get install selinux
Change the SELinux mode in /etc/selinux/config (optional):

Enforcing
sudo sed -i 's/SELINUX=.*/SELINUX=enforcing/' /etc/selinux/config
Permissive
sudo sed -i 's/SELINUX=.*/SELINUX=permissive/' /etc/selinux/config
Reboot

During shutdown all of the files on the system will be labeled. This may take some time depending on how many files you have and disk speed.

论坛徽章:
1
IT运维版块每日发帖之星
日期:2016-07-25 06:20:00
25 [报告]
发表于 2016-05-08 12:13 |只看该作者
真是对大哥感激不尽,唯一碰到的提问问题被如此认真回答的,呵呵,您说的这些可以实现的大哥,现在关键在于怎么利用reference policy 定制策略,apt-get install selinux 这样的不带源码,需要从别处获取,可从ubuntu官方获取的,make不过,总有这样那样的问题,我也是无奈了,大哥如果有什么办法,消息洗耳恭听!! 回复 24# SeAL80s


   

论坛徽章:
18
2015年迎新春徽章
日期:2015-03-04 10:16:53操作系统版块每日发帖之星
日期:2016-05-11 06:20:0015-16赛季CBA联赛之佛山
日期:2016-05-06 22:28:4415-16赛季CBA联赛之广夏
日期:2016-04-22 23:24:00操作系统版块每日发帖之星
日期:2016-04-21 06:20:00IT运维版块每周发帖之星
日期:2016-03-07 16:27:44操作系统版块每日发帖之星
日期:2016-02-03 06:20:00IT运维版块每日发帖之星
日期:2016-01-31 06:20:00IT运维版块每日发帖之星
日期:2016-01-30 06:20:00IT运维版块每日发帖之星
日期:2016-01-24 06:20:00IT运维版块每日发帖之星
日期:2016-01-23 06:20:00操作系统版块每日发帖之星
日期:2015-11-26 06:20:00
26 [报告]
发表于 2016-05-08 20:01 |只看该作者
回复 25# zhunxun


    我只能帮你安装的问题,具体开发的,我不搞这个,不太懂的。上面帖子说了,去Debian获取源码或者装Debian的包,都是deb,可能要手工解决依赖。我见帖子说,ubuntu默认用appamor,可能与selinux冲突。不知道是不是导致你安装selinux load出问题。帖子好像也说ubuntu的selinux维护的不好,或者不维护了,Debian的还在良好的维护。如果你已经解决安装问题了,那就忽略掉我说的就可以了。具体怎么找包,我想你也知道了

论坛徽章:
20
CU大牛徽章
日期:2013-04-17 11:48:26羊年新春福章
日期:2015-03-10 22:39:202015年中国系统架构师大会
日期:2015-06-29 16:11:282015亚冠之平阳省
日期:2015-07-31 09:19:042015七夕节徽章
日期:2015-08-21 11:06:17IT运维版块每日发帖之星
日期:2015-09-30 06:20:002015亚冠之柏太阳神
日期:2015-10-19 20:29:5915-16赛季CBA联赛之天津
日期:2016-11-29 14:03:4315-16赛季CBA联赛之北控
日期:2016-12-24 20:51:492015年辞旧岁徽章
日期:2015-03-03 16:54:15双鱼座
日期:2015-01-12 20:58:532014年中国系统架构师大会
日期:2014-10-14 15:59:00
27 [报告]
发表于 2016-05-09 20:34 |只看该作者
回复 26# SeAL80s


    appamor只是MAC(强制访问控制)的一种实现方式,Ubuntu默认是appamor,Redhat系列自带的是SELinux,Ubuntu也可以使用SELinux。只是不能同时使用appamor和SELinux,两者同时只能选择一个

论坛徽章:
20
CU大牛徽章
日期:2013-04-17 11:48:26羊年新春福章
日期:2015-03-10 22:39:202015年中国系统架构师大会
日期:2015-06-29 16:11:282015亚冠之平阳省
日期:2015-07-31 09:19:042015七夕节徽章
日期:2015-08-21 11:06:17IT运维版块每日发帖之星
日期:2015-09-30 06:20:002015亚冠之柏太阳神
日期:2015-10-19 20:29:5915-16赛季CBA联赛之天津
日期:2016-11-29 14:03:4315-16赛季CBA联赛之北控
日期:2016-12-24 20:51:492015年辞旧岁徽章
日期:2015-03-03 16:54:15双鱼座
日期:2015-01-12 20:58:532014年中国系统架构师大会
日期:2014-10-14 15:59:00
28 [报告]
发表于 2016-05-09 20:37 |只看该作者
楼主先把你编译策略的出错信息报上了,现在的SELinux策略主要是Redhat和Tresys这两个公司在维护,你可以从以下两个网站找源码,
https://github.com/TresysTechnology/refpolicy/wiki
http://www.selinuxproject.org/page/Main_Page

论坛徽章:
1
IT运维版块每日发帖之星
日期:2016-07-25 06:20:00
29 [报告]
发表于 2016-05-10 09:31 |只看该作者
感激不尽!!!回复 28# beyondfly


   

论坛徽章:
1
IT运维版块每日发帖之星
日期:2016-07-25 06:20:00
30 [报告]
发表于 2016-05-10 09:31 |只看该作者
感激不尽!!!回复 26# SeAL80s


   
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP