All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: different selinux file-context root
  2004-08-09 19:57 different selinux file-context root Luke Kenneth Casson Leighton
@ 2004-08-09 19:52 ` Stephen Smalley
  2004-08-10 12:45   ` Luke Kenneth Casson Leighton
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Smalley @ 2004-08-09 19:52 UTC (permalink / raw)
  To: Luke Kenneth Casson Leighton; +Cc: SE-Linux

On Mon, 2004-08-09 at 15:57, Luke Kenneth Casson Leighton wrote:
> 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

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

-- 
Stephen Smalley <sds@epoch.ncsc.mil>
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* different selinux file-context root
@ 2004-08-09 19:57 Luke Kenneth Casson Leighton
  2004-08-09 19:52 ` Stephen Smalley
  0 siblings, 1 reply; 3+ messages in thread
From: Luke Kenneth Casson Leighton @ 2004-08-09 19:57 UTC (permalink / raw)
  To: SE-Linux

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:lkcl@lkcl.net"> lkcl@lkcl.net </a> <br />


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: different selinux file-context root
  2004-08-09 19:52 ` Stephen Smalley
@ 2004-08-10 12:45   ` Luke Kenneth Casson Leighton
  0 siblings, 0 replies; 3+ messages in thread
From: Luke Kenneth Casson Leighton @ 2004-08-10 12:45 UTC (permalink / raw)
  To: Stephen Smalley; +Cc: SE-Linux

On Mon, Aug 09, 2004 at 03:52:23PM -0400, Stephen Smalley wrote:
> On Mon, 2004-08-09 at 15:57, Luke Kenneth Casson Leighton wrote:
> > 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
> 
> 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!

> 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 majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-08-10 12:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-09 19:57 different selinux file-context root Luke Kenneth Casson Leighton
2004-08-09 19:52 ` Stephen Smalley
2004-08-10 12:45   ` Luke Kenneth Casson Leighton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.