Bug 428746 - SELinux is preventing rpcbind (rpcbind_t) "write" to <Unknown> (var_lib_t).
SELinux is preventing rpcbind (rpcbind_t) "write" to <Unknown> (var_lib_t).
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: rpcbind (Show other bugs)
8
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-14 16:55 EST by Bruce Orchard
Modified: 2008-01-21 13:18 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-01-21 13:18:25 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bruce Orchard 2008-01-14 16:55:27 EST
Description of problem:

From setroubleshoot:  

Summary
    SELinux is preventing rpcbind (rpcbind_t) "write" to <Unknown> (var_lib_t).

Detailed Description
    SELinux is preventing rpcbind (rpcbind_t) "write" to <Unknown> (var_lib_t).
    The SELinux type var_lib_t, is a generic type for all files in the directory
    and very few processes (SELinux Domains) are allowed to write to this
    SELinux type.  This type of denial usual indicates a mislabeled file.  By
    default a file created in a directory has the gets the context of the parent
    directory, but SELinux policy has rules about the creation of directories,
    that say if a process running in one SELinux Domain (D1) creates a file in a
    directory with a particular SELinux File Context (F1) the file gets a
    different File Context (F2).  The policy usually allows the SELinux Domain
    (D1) the ability to write, unlink, and append on (F2).  But if for some
    reason a file (<Unknown>) was created with the wrong context, this domain
    will be denied.  The usual solution to this problem is to reset the file
    context on the target file, restorecon -v <Unknown>.  If the file context
    does not change from var_lib_t, then this is probably a bug in policy.
    Please file a http://bugzilla.redhat.com/bugzilla/enter_bug.cgi against the
    selinux-policy package. If it does change, you can try your application
    again to see if it works.  The file context could have been mislabeled by
    editing the file or moving the file from a different directory, if the file
    keeps getting mislabeled, check the init scripts to see if they are doing
    something to mislabel the file.

Allowing Access
    You can attempt to fix file context by executing restorecon -v <Unknown>

    The following command will allow this access:
    restorecon <Unknown>

Additional Information        

Source Context                system_u:system_r:rpcbind_t
Target Context                system_u:object_r:var_lib_t
Target Objects                None [ file ]
Affected RPM Packages         
Policy RPM                    
Selinux Enabled               
Policy Type                   
MLS Enabled                   
Enforcing Mode                
Plugin Name                   plugins.mislabeled_file
Host Name                     
Platform                      
Alert Count                   4
First Seen                    Sun 13 Jan 2008 04:27:36 AM CST
Last Seen                     Sun 13 Jan 2008 04:27:36 AM CST
Local ID                      42e3d152-6779-4622-876d-da7903ef9296
Line Numbers                  19542

Raw Audit Messages            

avc: denied { write } for comm=rpcbind dev=sdb1 name=rpcbind.file pid=1706
scontext=system_u:system_r:rpcbind_t:s0 tclass=file
tcontext=system_u:object_r:var_lib_t:s0




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


How reproducible:

I've seen lots of these, but I don't know if it happens every time.

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Daniel Walsh 2008-01-21 13:18:25 EST
You have a labeling problem.  /var/lib/rpcbind is not labeled correctly.

restorecon -R -v /var/lib/rpcbind 

will fix.

Did this directory get deleted and recreated.  When rpm installed rpcbind it
should have labeled the directory correctly.

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