Skip to contentSkip to conversation

debian and initrd with selinux on 2.6.0-test1

DISCUSSION max barwell 2 participants 2 messages Jul 19, 2003 SELinux security module

lore
Share & tools
lore
#0 lore raw

I had selinux running well on a 2.4 kernel but decided to be a bit more adventurous, so I am trying to get it going on 2.6.0-test1.

I am using Debian sid and the selinux-2.5-2003071106.tgz set of tools, from the NSA website.

In an email from Stephen Smalley he told me that the userland tools for 2.5 would be fine with 2.6, but one thing in the readme has me stumped, you have to patch your mkinitrd script to make an initrd image for selinux. The example given is for patching redhat 9's mkinitrd.

I am assuming this is possible, I am not so hot at coding, so writing my own patch could be a big ask for me. Could someone please tell/help/point me in the right direction, to get an initrd image for selinux and debian.

regards Max Barwell

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#1 lore raw
Quoted 5 lines · max barwell

I had selinux running well on a 2.4 kernel but decided to be a bit more adventurous, so I am trying to get it going on 2.6.0-test1.

I am using Debian sid and the selinux-2.5-2003071106.tgz set of tools, from the NSA website.

You might want to try my experimental packages (just announced a few minutes ago); otherwise you will likely end up redoing a lot of the work that I've already done.

Quoted 4 lines

I am assuming this is possible, I am not so hot at coding, so writing my own patch could be a big ask for me. Could someone please tell/help/point me in the right direction, to get an initrd image for selinux and debian.

My selinux-policy-default Debian package contains hooks for the Debian mkinitrd (in initrd-tools) that work for SELinux 2.5. I've attached the scripts for reference.

#!/bin/sh -e
echo Loading policy
mount -nt selinuxfs none /selinux
/bin/load_policy /etc/security/selinux/policy.15 || (echo "Policy load failed!"; exit 1) echo Done loading policy

#!/bin/sh -e
# Install binary policy file and load_policy utility for loading it. test -n "$INITRDDIR"
mkdir -p "$INITRDDIR"/selinux
mkdir -p "$INITRDDIR"/etc/security/selinux
mkdir -p "$INITRDDIR"/scripts
cp -a /etc/security/selinux/policy.15 "$INITRDDIR/etc/security/selinux/policy.15" cp -a /usr/sbin/load_policy "$INITRDDIR/bin/load_policy"
cp -a /usr/share/selinux/initrd-script "$INITRDDIR/scripts/selinux"