Home | History | Annotate | Line # | Download | only in dist
      1  1.1  christos 
      2  1.1  christos How to get TrouSerS up and running with an SELinux policy.
      3  1.1  christos Kent Yoder <kyoder (a] users.sf.net>
      4  1.1  christos 
      5  1.1  christos This howto assumes a Fedora Core 4 install.
      6  1.1  christos 
      7  1.1  christos 1. Install and load the device driver
      8  1.1  christos  # wget http://download.fedora.redhat.com/pub/fedora/linux/core/4/SRPMS/kernel-2.6.11-1.1369_FC4.src.rpm
      9  1.1  christos  # rpm -ivh kernel-2.6.11-1.1369_FC4.src.rpm
     10  1.1  christos  # cd /usr/src/redhat/SPECS
     11  1.1  christos  # rpmbuild -bp ./kernel-2.6.spec
     12  1.1  christos  # cd /usr/src/redhat/BUILD/kernel-2.6.11/linux-2.6.11
     13  1.1  christos  # make menuconfig
     14  1.1  christos    - Goto Device Drivers > Character Devices > TPM Devices
     15  1.1  christos    - enable the drivers
     16  1.1  christos  # make
     17  1.1  christos  # make modules_install
     18  1.1  christos  # make install
     19  1.1  christos  # reboot
     20  1.1  christos  # modprobe tpm_atmel (or others...)
     21  1.1  christos 
     22  1.1  christos 2. Build and install trousers in the system location. The SELinux policy assumes
     23  1.1  christos    that trousers is installed in the system location. To change these, edit
     24  1.1  christos    the trousers.fc file.
     25  1.1  christos 
     26  1.1  christos  # tar zxvf trousers-0.2.1.tar.gz
     27  1.1  christos  # cd trousers-0.2.1
     28  1.1  christos  # ./configure --prefix=/usr
     29  1.1  christos  # make
     30  1.1  christos  # make install
     31  1.1  christos 
     32  1.1  christos 3. Install the SELinux policy sources
     33  1.1  christos 
     34  1.1  christos  # yum install selinux-policy-targeted-sources.noarch
     35  1.1  christos 
     36  1.1  christos 4. Install the trousers te and fc files and load the policy
     37  1.1  christos 
     38  1.1  christos  # cp ./dist/fedora/trousers.te /etc/selinux/targeted/src/policy/domains/program
     39  1.1  christos  # cp ./dist/fedora/trousers.fc /etc/selinux/targeted/src/policy/file_contexts/program
     40  1.1  christos  # cd /etc/selinux/targeted/src/policy
     41  1.1  christos  # make clean
     42  1.1  christos  # make reload
     43  1.1  christos  # make install
     44  1.1  christos  # make relabel
     45  1.1  christos 
     46  1.1  christos  At this point, there should be a trousers-specific type for /dev/tpm0:
     47  1.1  christos 
     48  1.1  christos  # ls -Z /dev/tpm*
     49  1.1  christos  crw-rw----  root     root     system_u:object_r:tcsd_device_t  /dev/tpm0
     50  1.1  christos 
     51  1.1  christos  Also, checking the security context of the running tcsd should show it running
     52  1.1  christos with the tcsd_t type:
     53  1.1  christos 
     54  1.1  christos  # ps -Zef |grep tcsd
     55  1.1  christos  root:system_r:tcsd_t            root     16362     1  0 15:10 ?        00:00:00 /usr/sbin/tcsd
     56  1.1  christos 
     57  1.1  christos 5. That should be it!  Send bugs and questions to trousers-users (a] lists.sf.net.
     58  1.1  christos 
     59