Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Issues with selinux

    Hello, I have very strange things with selinux. My post may be will bit disordered, because I'm not completely understand what is going on.

    Before all the story, I had good and very stable Linux installation:
    CentOS 5.5
    uname -a:
    Linux andreys-comp 2.6.18-194.8.1.el5xen #1 SMP Thu Jul 1 19:41:05 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

    echo $?

    But one day (yesterday) I decided to do "yum update" and in parallel:
    cvs -d: -z3 co nsa
    (cvs downloaded all files to /selinux directory that created itself)

    After downloading I read README where it says that for completely install self compiled selinux I need do:
    make menuconfig
    make install

    I did only make (!), but directly after that my computer become crazy.
    I don't know whether all this because of system update, or selinux compilation or both, but firefox stopped display pages and when I try to run system-config-selinux that I recently installed, I get:
    /usr/lib64/python2.4/site-packages/selinux/ undefined symbol: selinux_check_securetty_context
    and not run.
    After that I rebooted the system, during system up I get kernel panic and some thing like: "failed to apply selinux policy" (I don't remember exactly, the message don't stay on screen enough time because computer go down)
    So what I did, is to run from LiveCD for disable selinux in /etc/selinux/config file, but (!) (here comes culmination moment) when I run ls on / of LiveCD file system, I see:
    [root@livecd /]# ls -la
    total 180
    drwxr-xr-x 4 root root 0 Aug 9 18:23 selinux

    But it is virtual filesystem! I remember that cvs downloaded all source to /selinux.
    This is context of this directory: system_u:object_r:security_t
    More of this, /selinix directory even had files inside of it. One of them was null character device.
    Is this regular directory of LiveCD's file system? Or this is my recently created by cvs directory in some mysterious storage and insidiously mounted to root file system of LiveCD?

    After that I mounted my hard disk's root file system, I did ls and find my selinux directory that stay there completely competently:

    [root@livecd VolGroup00-LogVol01]# ls -la
    total 240
    drwxr-xr-x 2 root root 4096 Jun 5 07:01 selinux

    but (!) this directory now was empty inside!
    This is context of the directory: system_u:object_r:file_t

    This is mountings that were in LiveCD mode:
    /dev/mapper/live-rw on / type ext3 (rw,noatime)
    proc on /proc type proc (rw)
    sysfs on /sys type sysfs (rw)
    devpts on /dev/pts type devpts (rw,gid=5,mode=620)
    tmpfs on /dev/shm type tmpfs (rw)
    none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
    /dev/hdc on /mnt/live type iso9660 (ro)
    /dev/sda2 on /mnt/disc/sda2 type ext3 (ro)
    /dev/sda6 on /mnt/disc/sda6 type vfat (ro,uid=500)
    /dev/mapper/VolGroup00-LogVol01 on /mnt/lvm/VolGroup00-LogVol01 type ext3 (rw)
    /dev/mapper/VolGroup00-LogVol00 on /mnt/lvm/VolGroup00-LogVol00 type ext3 (ro)

    After all this I disabled selinux in appropriate file:

    and restarted computer. After booting up, I do ls on root again and see that again I have selinux directory, but it again empty!

    [root@andreys-comp selinux]# pwd
    [root@andreys-comp selinux]# ls
    [root@andreys-comp selinux]#

    More of this. When I booted from hard disk, I mounted the squashfs.img on LiveCD and ext3fs.img on it, that contains all root file system, and this what I see:

    [root@andreys-comp isotemp2]# mount
    /isotemp/LiveOS/ext3fs.img on /isotemp2 type ext3 (ro,loop=/dev/loop1)
    [root@andreys-comp isotemp2]# ls -l
    total 180
    drwxr-xr-x 2 root root 4096 Oct 2 2009 selinux
    [root@andreys-comp isotemp2]# cd selinux/
    [root@andreys-comp selinux]# ls
    [root@andreys-comp selinux]#

    It is also empty!
    Where all selinux code?

    Now, may be I tell much about selinux folders, but the question about my general trouble with selinux is not less important for me.
    So, if I enable selinux I get kernel panic (even if I up in runlevel 1).
    After booting with LiveCD and disabling it, all work again.

    So I have two questions:
    1. Where all compiled selinux objects?
    2. How I give back harmony and peace to my computer's world?

    Thank you for ahead.

  2. #2
    So I'm decided to reinstall the system.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts