Skip to contentSkip to conversation

different selinux file-context root

DISCUSSION Luke Kenneth Casson Leighton 2 participants 3 messages Aug 9, 2004 – Aug 10, 2004 SELinux security module

lore
Share & tools
lore
#0 lore raw

i'm thinking of doing installs of selinux systems and online backups/restores from an initial ramdisk.

e.g. modifying rsync to cope with selinux file contexts.

e.g. there are several backup programs that create bootable CDs, that then redo the entire system.

what would make sense is for rsync, star etc. to have a context-"chroot" under which the selinux file contexts get recreated relative to that directory as the root filesystem.

then i don't have to mess about ensuring that the entire filesystem is correctly there and then doing something like this:

chroot /mnt-point make -C /etc/selinux/src relabel

l.

--
Truth, honesty and respect are rare commodities that all spring from the same well: Love. If you love yourself and everyone and everything around you, funnily and coincidentally enough, life gets a lot better. --
<a href="http://lkcl.net"> lkcl.net </a> <br />
<a href="mailto:[email protected]"> [email protected] </a> <br />

--
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 8 lines · Luke Kenneth Casson Leighton

i'm thinking of doing installs of selinux systems and online backups/restores from an initial ramdisk.

e.g. modifying rsync to cope with selinux file contexts.

e.g. there are several backup programs that create bootable CDs, that then redo the entire system.

Quoted 8 lines

what would make sense is for rsync, star etc. to have a context-"chroot" under which the selinux file contexts get recreated relative to that directory as the root filesystem.

then i don't have to mess about ensuring that the entire filesystem is correctly there and then doing something like this:

chroot /mnt-point make -C /etc/selinux/src relabel

setfiles has a -r rootpath option (contributed by the Gentoo folks) that causes it to strip the specified rootpath prior to matching against file_contexts. Or, if using matchpathcon() directly, you can always have the caller strip the rootpath itself prior to invoking matchpathcon().

Signature · 8 lines
Stephen Smalley <[email protected]>
National Security Agency


--
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.
#2 lore raw
Quoted 13 lines · Stephen Smalley
Quoted 12 lines · Luke Kenneth Casson Leighton

i'm thinking of doing installs of selinux systems and online backups/restores from an initial ramdisk.

e.g. modifying rsync to cope with selinux file contexts.

e.g. there are several backup programs that create bootable CDs, that then redo the entire system.

what would make sense is for rsync, star etc. to have a context-"chroot" under which the selinux file contexts get recreated relative to that directory as the root filesystem.

Quoted 8 lines
Quoted 4 lines

then i don't have to mess about ensuring that the entire filesystem is correctly there and then doing something like this:

chroot /mnt-point make -C /etc/selinux/src relabel

setfiles has a -r rootpath option (contributed by the Gentoo folks) that causes it to strip the specified rootpath prior to matching against file_contexts.

great!

Quoted 3 lines

Or, if using matchpathcon() directly, you can always have the caller strip the rootpath itself prior to invoking matchpathcon().

yukk :)

l.

--
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.