[PATCH] Add 'setcon', 'getcon' commands to set and get the SELinux context
These commands let you set and get the SELinux context of the daemon and all operations in the API and processes run from the daemon: $ ./fish/guestfish --ro -a /dev/mapper/vg_trick-F11x64 \ selinux 1 : \ run : \ mount /dev/vg_f11x64/lv_root / : \ sh "/usr/sbin/load_policy" : \ getcon : \ setcon "system_u:system_r:unconfined_t:s0" : \ getcon system_u:system_r:kernel_t:s0 system_u:system_r:unconfined_t:s0 Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/
On Wed, Aug 12, 2009 at 05:21:37PM +0100, Richard W.M. Jones wrote:
setcon "system_u:system_r:unconfined_t:s0" : \
In case anyone gets the wrong idea, for Fedora/RHEL that context should actually be: unconfined_u:unconfined_r:unconfined_t:s0 And it could be different for other distributions, or even for variations of RHEL. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v
Matt has persuaded me that setcon/getcon aren't necessary. So for now I will park this patch, unless someone comes along who would potentially use it. Attached is the latest version of the patch. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/
On Wed, Aug 12, 2009 at 05:48:11PM +0100, Richard W.M. Jones wrote:
Matt has persuaded me that setcon/getcon aren't necessary. So for now I will park this patch, unless someone comes along who would potentially use it.
Attached is the latest version of the patch.
Since it seems we may need this, I pushed this commit. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/
participants (1)
-
Richard W.M. Jones