LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   How can I solve the chcon problem ? (https://www.linuxquestions.org/questions/linux-security-4/how-can-i-solve-the-chcon-problem-918878/)

ggstone 12-15-2011 08:30 AM

How can I solve the chcon problem ?
 
when I install the ati video card driver to my system,it's show that:
/usr/bin/chcon: can't apply partial context to unlabeled file /usr/lib/xorg/modules/drivers/fglrx_drv.so'
/usr/bin/chcon: can't apply partial context to unlabeled file `/usr/lib/fglrx/fglrx-libGL.so.1.2'
...........and so on.
Shall I set some parameter for "/usr/lib/" using "chcon" command ?
Please help me.
Thanks a lot!

unSpawn 12-15-2011 04:10 PM

Quote:

Originally Posted by ggstone (Post 4550605)
Shall I set some parameter for "/usr/lib/" using "chcon" command ?

I think you should first check if your file system needs relabeling. What does 'restorecon -i -R -n -vv /usr/lib 2>&1| grep -v symbolic;' say?

ggstone 12-15-2011 07:14 PM

restorecon -i -R -n -vv /usr/lib 2>&1| grep -v symbolic
say nothing.....
why?

unSpawn 12-16-2011 04:52 PM

Hmm. If it would need relabeling it would return something. What does '\ls -alZ /usr/lib/xorg/modules/drivers/ /usr/lib/fglrx/' return? (Find out if this is an unlabeled system.)

ggstone 12-18-2011 09:24 PM

Quote:

Originally Posted by unSpawn (Post 4551994)
Hmm. If it would need relabeling it would return something. What does '\ls -alZ /usr/lib/xorg/modules/drivers/ /usr/lib/fglrx/' return? (Find out if this is an unlabeled system.)

unSpawn,Thanks a lot!
I fixed it.
I modify the libselinux-2.0.94-5.2.el6.src.rpm source code,make is_selinux_enabled() function return 0, and then the ati driver installed OK.

unSpawn 12-19-2011 01:11 AM

Quote:

Originally Posted by ggstone (Post 4553351)
I fixed it. I modify the libselinux-2.0.94-5.2.el6.src.rpm source code,make is_selinux_enabled() function return 0

That's not a "fix", that's deliberate destruction, subversion and completely out of proportion.

ggstone 12-21-2011 07:30 PM

Quote:

Originally Posted by unSpawn (Post 4553422)
That's not a "fix", that's deliberate destruction, subversion and completely out of proportion.

How to find out if this is an unlabeled system? if so,how to label the system? Thanks.

unSpawn 12-22-2011 03:46 AM

OK, let's identify components. I'm sure I've got more questions (bit short on time right now), after you have restored libselinux-2.0.94-5.2.el6, what do the following return:
rpm -q kernel
rpm -qa|grep selinux
grep -v ^# /etc/selinux/config|grep .
/usr/sbin/selinuxenabled; echo $?
cat /proc/mounts


All times are GMT -5. The time now is 04:24 AM.