Bug 752425 - SELinux prevents creation of kickstart profile.
Summary: SELinux prevents creation of kickstart profile.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 1.5
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
: 755357 (view as bug list)
Depends On:
Blocks: space16
TreeView+ depends on / blocked
 
Reported: 2011-11-09 13:32 UTC by Andrey Lyarskiy
Modified: 2012-03-06 09:17 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-10 05:55:59 UTC
Embargoed:


Attachments (Terms of Use)

Description Andrey Lyarskiy 2011-11-09 13:32:07 UTC
Description of problem:
AVC denials while setting up kickstart profile. OS ScientificLinux 6.1 x86_64

Version-Release number of selected component (if applicable):
Spacewalk 1.5

How reproducible:
Always

Steps to Reproduce:
1. Install ScientificLinux 6 x86_64 with SELinux enforcing
2. Install Spacewalk 1.5 from repos
3. Create base channel and kickstart distribution
4. Create kickstart profile
5. Click Finish at Step 3
  
Actual results:
Server 500 Internal Error after clicking Finish

Expected results:
Profile created

Additional info:
Guess there is missing permissions in selinux-policy:
# grep cobblerd /var/log/audit/audit.log | audit2allow -m cobblerd

module cobblerd 1.0;

require {
	type cobblerd_t;
	type var_lib_t;
	class file { read getattr open };
}

#============= cobblerd_t ==============
allow cobblerd_t var_lib_t:file { read getattr open };

Will attach audit.log on request/

Comment 1 Andrey Lyarskiy 2011-11-09 13:38:24 UTC
audit.log:
type=AVC msg=audit(1320843474.395:533): avc:  denied  { getattr } for  pid=7712 comm="cobblerd" path="/var/lib/rhn/kickstarts/wizard/sl6-vm-common-x86_64--1.cfg" dev=dm-0 ino=4205465 scontext=system_u:system_r:cobblerd_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=file
type=SYSCALL msg=audit(1320843474.395:533): arch=c000003e syscall=4 success=no exit=-13 a0=7f4cd00010e0 a1=7f4ce09f3a10 a2=7f4ce09f3a10 a3=762d366c732f6472 items=0 ppid=1 pid=7712 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="cobblerd" exe="/usr/bin/python" subj=system_u:system_r:cobblerd_t:s0 key=(null)

# ls -Z /var/lib/rhn/kickstarts/wizard/
-rw-r--r--. tomcat tomcat system_u:object_r:var_lib_t:s0   sl6-vm-common-x86_64--1.cfg

Comment 2 Michael Mráka 2011-11-09 14:25:39 UTC
It seems to be wrong selinux context, correct context of /var/lib/rhn/kickstarts/* is system_u:object_r:spacewalk_data_t.

What does says: restorecon -vvR  /var/lib/rhn/kickstarts/ ?

Comment 3 Andrey Lyarskiy 2011-11-10 05:55:59 UTC
After restorecon context changed to system_u:object_r:spacewalk_data_t:s0. Not a bug.

Suppose it should be added to HowTo.

Comment 4 Michael Mráka 2011-11-21 10:10:53 UTC
*** Bug 755357 has been marked as a duplicate of this bug. ***


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