Bug 754347

Summary: rpc.statd fails to start with: rpc.statd: Could not bind socket: (13) Permission denied
Product: [Fedora] Fedora Reporter: Bojan Smojver <bojan>
Component: selinux-policy-targetedAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED WONTFIX QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 16CC: dwalsh, gregorio.gervasio, igeorgex
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-13 18:49:20 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 Bojan Smojver 2011-11-16 08:46:07 UTC
Description of problem:
I'm running SELinux targeted policy on this machine and I have this in /etc/sysconfig/nfs:
----------------------------
LOCKD_TCPPORT=4001
LOCKD_UDPPORT=4001
STATDARG="-p 4000"
----------------------------

Normally, rpc.statd won't start. So, went to look in /var/log/audit/audit.log. After runing audit2allow, putting the result into a local module I have, I get:
-------------------
require {
	type var_run_t;
	type rpcd_t;
	class file { write unlink };
}

#============= rpcd_t ==============
#!!!! This avc is allowed in the current policy

allow rpcd_t var_run_t:file { write unlink };
----------------------------

All good. However, if I attempt service nfs-lock restart, I still get:
----------------------------
Redirecting to /bin/systemctl  restart nfs-lock.service
Job failed. See system logs and 'systemctl status' for details.
----------------------------

If I then do setenforce 0 and run restart, it starts up just fine. There are no new denials in the audit.log.

I can then turn enforcement back on and the system works fine.

Very confusing.

Version-Release number of selected component (if applicable):
selinux-policy-targeted-3.10.0-55.fc16.noarch

How reproducible:
Always.

Steps to Reproduce:
1. See above.
  
Actual results:
nfs-lock fails to start with SELinux enforcing.

Expected results:
Used to work.

Additional info:

Comment 1 Daniel Walsh 2011-11-16 21:08:46 UTC
Miroslav we need to backport

commit 74596f9220c904b756a5f610a8d4c9bd5fb5c76c

ASAP to fix this problem.


restorecon -R -v /run should fix the first problem where you loaded the policy module.

Comment 2 Fedora End Of Life 2013-01-16 15:41:52 UTC
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Fedora End Of Life 2013-02-13 18:49:23 UTC
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.