Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 160662

Summary: su not allowed in an init script
Product: [Fedora] Fedora Reporter: Markku Kolkka <markku.kolkka>
Component: selinux-policy-targetedAssignee: Daniel Walsh <dwalsh>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
URL: http://boinc.berkeley.edu/autostart_dennett.txt
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-08-25 15:43:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Markku Kolkka 2005-06-16 14:10:49 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; fi-FI; rv:1.7.8) Gecko/20050524 Fedora/1.0.4-4 Firefox/1.0.4

Description of problem:
I have been using the "boincctl" script in http://boinc.berkeley.edu/autostart_dennett.txt to start BOINC (http://boinc.berkeley.edu/) at boot in FC2 and FC3 without problems but after upgrading to FC4, the script fails when SELinux is in enforcing mode. Same happens with "service boincctl start" from the command line. 

Version-Release number of selected component (if applicable):
selinux-policy-targeted-1.23.16-6

How reproducible:
Always

Steps to Reproduce:
1. Install BOINC and the script in the URL
2. Edit the script and add it to startup with chkconfig
3. Reboot
  

Actual Results:  On the console:

Starting boinc
su: /bin/bash: Permission denied

In the system log:

audit(1118913920.599:2): avc:  denied  { transition } for  pid=2184 comm="su" name=bash dev=dm-0 ino=45101 scontext=system_u:system_r:initrc_t tcontext=user_u:system_r:unconfined_t tclass=process


Expected Results:  Console shows:
Starting boinc              [OK]


Additional info:

Startup succeeds with SELinux in permissive mode.

Comment 1 Daniel Walsh 2005-06-16 20:34:52 UTC
Does it work if you use 

runuser as opposed to su?

Dan

Comment 2 Markku Kolkka 2005-06-16 21:28:06 UTC
Yes, replacing su with runuser works.