Bug 825357 - SELinux is not enforced when running httpd from the command line
Summary: SELinux is not enforced when running httpd from the command line
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 17
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-25 19:08 UTC by Kevin Clevenger
Modified: 2012-05-27 19:14 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-27 19:14:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Kevin Clevenger 2012-05-25 19:08:48 UTC
Description of problem:
When starting httpd with systemctl the httpd process runs with "system_u:system_r:httpd_t". When starting httpd from the command line the httpd process runs with "unconfined_u:unconfined_r:unconfined_t".

Version-Release number of selected component (if applicable):
selinux-policy-targeted-3.10.0-125.fc17.noarch
httpd-2.2.22-4.fc17.x86_64

How reproducible:
Run systemctl start httpd.service
Run httpd or httpd -X from the command line

Steps to Reproduce:
1. Run httpd or httpd -X from the command line 
2.
3.
  
Actual results:
httpd runs as unconfined_u:unconfined_r:unconfined_t

Expected results:
httpd runs as unconfined_u:system_r:httpd_t

Additional info:
Running httpd with FollowSymlinks and AllowOverride All. I'm symlinking a php webapp from ~/Sites/site to /var/www/html/site

Comment 1 Miroslav Grepl 2012-05-27 19:14:07 UTC
Yes, this is correct. You should not run httpd without the unit file. If you need this you can use runcon

# runcon -u system_u -r system_r -t initrc_t -- runcon -t httpd_t -- httpd -X


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