Skip to contentSkip to conversation

restorecon and chroot

DISCUSSION Russell Coker 2 participants 4 messages Jul 15, 2010 – Jul 19, 2010 SELinux security module

lore
Share & tools
lore
#0 lore raw

I think that we need an option for restorecon which is similar to the -r option of setfiles.

This would be useful for setting up chroot environments and possibly also for system recovery.

Any suggestion on what command-line option should be used? It seems that -r is taken...

Signature · 8 lines
[email protected]
http://etbe.coker.com.au/          My Main Blog
http://doc.coker.com.au/           My Documents Blog

--
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 9 lines · Russell Coker

I think that we need an option for restorecon which is similar to the -r option of setfiles.

This would be useful for setting up chroot environments and possibly also for system recovery.

Any suggestion on what command-line option should be used? It seems that -r is taken...

Why not just use setfiles, since you will need to specify the file_context path anyways?

--
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 2 lines · Daniel J Walsh

Why not just use setfiles, since you will need to specify the file_context path anyways?

setfiles requires that you specify the full path of the file_contexts file, this means that documentation that refers to it has to be distribution specific to a certain extent and it's annoying to use.

Now if setfiles could default to using the same file_contexts file that restorecon uses then that objection would go away. Do you think we should change setfiles in such a manner?

Signature · 8 lines
[email protected]
http://etbe.coker.com.au/          My Main Blog
http://doc.coker.com.au/           My Documents Blog

--
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.
#3 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 4 lines · Russell Coker
Quoted 2 lines · Daniel J Walsh

Why not just use setfiles, since you will need to specify the file_context path anyways?

Quoted 8 lines

setfiles requires that you specify the full path of the file_contexts file, this means that documentation that refers to it has to be distribution specific to a certain extent and it's annoying to use.

Now if setfiles could default to using the same file_contexts file that restorecon uses then that objection would go away. Do you think we should change setfiles in such a manner?

Ok, so you want restorecon to use an alternate root dir. I misunderstood. The reason I originally wrote restorecon was I got sick of specifying the path.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkxEWUgACgkQrlYvE4MpobN69gCgxJpwK5FMgbc58v5pcVOjL91E 0zcAnAroL61TitjY3WvBCHotKdE5Oq6a
=Qi/5
-----END PGP SIGNATURE-----

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