Bug 590124

Summary: tgtd requires selinux policy
Product: [Fedora] Fedora Reporter: Dave Allan <dallan>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 13CC: dwalsh, mchristi, mgrepl, terje.rosten
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-29 16:37:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dave Allan 2010-05-07 19:03:42 UTC
Description of problem:
tgtd does not start on F13 unless selinux is disabled.  I hacked together the following policy to get it to start, but I'm not an selinux wizard, so I'm not certain of the appropriateness of this policy, particularly the default_t file part.

Version-Release number of selected component (if applicable):
scsi-target-utils-1.0.1-3.fc13.x86_64

How reproducible:
100%

Steps to Reproduce:
1. enable selinux
2. start tgtd

Here's the policy I used to get it to start:

module tgtd 1.0;

require {
	type tgtd_t;
	type iscsid_t;
	type default_t;
	class sem { unix_read unix_write associate read write destroy };
	class file { read write open getattr };
}

#============= tgtd_t ==============
allow tgtd_t iscsid_t:sem  { unix_read unix_write associate read write destroy };
allow tgtd_t default_t:file { read write open getattr };

If there's more information I can provide, please don't hesitate to ask.  It's also easy for me to create throwaway VMs for testing.

Comment 1 Mike Christie 2010-05-08 01:52:25 UTC
Moving to selinux policy since that package is the one that will have to be modified for the changes.

Comment 2 Daniel Walsh 2010-05-10 17:46:22 UTC
Could you attach the audit log that you used to generate this policy?

default_t looks wrong.  Is there a new directory under /?


Does tgtd communicate with iscsi using semaphores?

Comment 3 Daniel Walsh 2010-05-10 17:52:52 UTC
Added semaphore line in selinux-policy-3.7.19-15.fc13.noarch