libsepol.so.1引发的无知
时间:2007-01-22 来源:适兕
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8"><title></title><meta name="GENERATOR" content="RedOffice 3.0 (Linux)"><meta name="CREATED" content="20070122;20264100"><meta name="CHANGED" content="16010101;0"> <style> </style>
有过这样的一次经历:
在升级fedora的过程中,发现了一个冲突的软件包,libsepol,强制去删除它。结果导致99%的程序不能用。比如常用的ls,mount,cp等,说是找不到一个叫做libsepol.so.1的动态库。重启系统,在初始化init进程的时候,也是找不到libsepol.so.1,然后kernel panic。将/etc/selinuc/conf文件中的SELINUX=disabled.系统仍然启动不起来,这是我比较迷茫的地方。 用安装盘将此文件复制到/lib下,可以启动了,于是想探个究竟。 在 google上搜了一把,毫无结果,总是些rpm或deb包之类的东西,没有什么讲解性的东西。只有靠自己慢慢的摸索了,“提问的艺术”告诉我,不要轻易的去问,要自己先思考一番。 首先我利用rpm来看一下这个信息。 [root@lee ~]# rpm -qai libsepol Name : libsepol Relocations: /usr Version : 1.1.1 Vendor: Asianux Release : 2 Build Date: 2005年08月05日 星期五 01时30分08秒 Install Date: 2006年12月20日 星期三 12时58分24秒 Build Host: Trinity-IA32.asianux.com Group : System Environment/Libraries Source RPM: libsepol-1.1.1-2.src.rpm Size : 54160 License: GPL Signature : DSA/SHA1, 2005年08月05日 星期五 01时30分08秒, Key ID 1246298df47bed1d Packager : [email protected] Summary : SELinux binary policy manipulation library Description : Security-enhanced Linux is a patch of the Linux庐 kernel and a number of utilities with enhanced security functionality designed to add mandatory access controls to Linux. The Security-enhanced Linux kernel contains new architectural components originally developed to improve the security of the Flask operating system. These architectural components provide general support for the enforcement of many kinds of mandatory access control policies, including those based on the concepts of Type Enforcement庐, Role-based Access Control, and Multi-level Security. libsepol provides an API for the manipulation of SELinux binary policies. It is used by checkpolicy (the policy compiler) and similar tools, as well as by programs like load_policy that need to perform specific transformations on binary policies such as customizing policy boolean settings. 确实是SELinux下的东西。直译是安全linux二进制规则控制库。还有就是利用ldd来查看一些信息了。SELinux无孔不入。 [root@lee ~]# ldd -v /sbin/init libsepol.so.1 => /lib/libsepol.so.1 (0x00999000) libselinux.so.1 => /lib/libselinux.so.1 (0x00101000) libc.so.6 => /lib/tls/libc.so.6 (0x0086e000) /lib/ld-linux.so.2 (0x00855000) Version information: /sbin/init: libc.so.6 (GLIBC_2.2) => /lib/tls/libc.so.6 libc.so.6 (GLIBC_2.3) => /lib/tls/libc.so.6 libc.so.6 (GLIBC_2.1) => /lib/tls/libc.so.6 libc.so.6 (GLIBC_2.0) => /lib/tls/libc.so.6 /lib/libsepol.so.1: libc.so.6 (GLIBC_2.3) => /lib/tls/libc.so.6 libc.so.6 (GLIBC_2.1.3) => /lib/tls/libc.so.6 libc.so.6 (GLIBC_2.1) => /lib/tls/libc.so.6 libc.so.6 (GLIBC_2.0) => /lib/tls/libc.so.6 /lib/libselinux.so.1: libc.so.6 (GLIBC_2.1.3) => /lib/tls/libc.so.6 libc.so.6 (GLIBC_2.1) => /lib/tls/libc.so.6 libc.so.6 (GLIBC_2.0) => /lib/tls/libc.so.6 libc.so.6 (GLIBC_2.3) => /lib/tls/libc.so.6 libc.so.6 (GLIBC_2.3.4) => /lib/tls/libc.so.6 /lib/tls/libc.so.6: ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2 ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2 ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2 ld-linux.so.2 (GLIBC_2.0) => /lib/ld-linux.so.2 想想上次,一个apache在SELinux中的设置,导致系统启动不起来,自己没有弄明白状况了什么也没有动,结果没有给朋友搞定问题,丢人不说,连自己的人品也丢了,详情请参阅我的博客《一次工作之外的经历》。 SELinux的配置不正确,会导致内核恐慌!这是个我见过两次的现象。就像是PAM的内核库一样,没有人轻易的去动它。但是要有个了解的过程。具听说SELinux是个复杂的东西,不是一般人可以操作的。 我能对它了解到一个什么样的程度了呢?
相关阅读 更多 +