Bug 475497 - set correct selinux security context for lvm partitions [f-10]
set correct selinux security context for lvm partitions [f-10]
Product: Fedora
Classification: Fedora
Component: koan (Show other bugs)
All Linux
high Severity high
: ---
: ---
Assigned To: Michael DeHaan
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-12-09 10:05 EST by Anton Arapov
Modified: 2014-06-18 04:02 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-12-16 08:17:41 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
proposed patch (1.40 KB, patch)
2008-12-09 10:05 EST, Anton Arapov
no flags Details | Diff
proposed patch (1.42 KB, patch)
2008-12-10 03:37 EST, Anton Arapov
no flags Details | Diff

  None (edit)
Description Anton Arapov 2008-12-09 10:05:15 EST
On selinux enabled system:

 # cobbler system add --name vguest --profile F-10-x86_64 --virt-type qemu
--virt-bridge virbr0 --virt-path vg
 # koan --server 'host' --virt --system vguest2

  these will fail to run, because koan-1.2.6-1.fc10.noarch did not set the correct security context for created lvm partition.
  it must execute something like: "chcon -t virt_image_t /dev/mapper/%lvm_partition%"
Comment 1 Anton Arapov 2008-12-09 10:05:52 EST
Created attachment 326326 [details]
proposed patch

just a possible fix. works for me! :)
Comment 2 Michael DeHaan 2008-12-09 10:59:35 EST
Yes, this was also discussed on IRC (#cobbler) yesterday and should be fixed.

Upstream cobbler's Trac instance is fedorahosted.org/cobbler.   Please file defects there also so they will not be lost.  You may skip bugzilla entirely if you like.
Comment 3 Michael DeHaan 2008-12-09 11:01:30 EST
Thanks for the patch, please share this with the cobbler mailing list and we'll look at merging it.

All patches need to go to the list so they have a chance to be reviewed by a wider audience.

The part about "+                args = "/usr/sbin/selinuxenabled" is most certaintly wrong as that is not present on my install, cobbler has some code in it already that checks getenforce, which you can reuse.
Comment 4 Anton Arapov 2008-12-10 03:37:03 EST
Created attachment 326464 [details]
proposed patch
Comment 5 Anton Arapov 2008-12-10 03:57:01 EST
Posted for review:

Note You need to log in before you can comment on or make changes to this bug.