Bug 170057

Summary: OpenAFS on RHEL 4 Update 2
Product: Red Hat Enterprise Linux 4 Reporter: Jack Neely <jjneely>
Component: selinux-policy-targetedAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: nalin
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2006-0049 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-03-07 18:11: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:
Bug Depends On:    
Bug Blocks: 168429    

Description Jack Neely 2005-10-06 21:08:41 UTC
Description of problem:
After rebuilding OpenAFS to work on 2.6.9-22.EL after upgrading to U2 SELinux
will not allow the AFS daemons to mount /afs.

[root@rk-test4 ~]# service afs start
Loading AFS kernel module:  Found system call table at 0xc0359540 (pattern scan)
                                                          [  OK  ]
Starting AFS client: Starting AFS cache scan...Memory cache: Allocating 800
dcache entries...found 0 non-empty cache files (0%).
audit(1128631218.616:4): avc:  denied  { mount } for  pid=3524 comm="afsd"
name="/" dev=afs ino=0 scontext=root:system_r:initrc_t
tcontext=system_u:object_r:unlabeled_t tclass=filesystem
WARM shutting down of: CB... afs... BkG... CTrunc... AFSDB... RxEvent...
UnmaskRxkSignals... RxListener...
afsd: All AFS daemons started.
afsd: All AFS daemons started.
afsd: Can't mount AFS on /afs(13)
                                                           [FAILED]

Nor will SELinux allow afsd to unmount itself at shutdown.

Let me know if I need to post some OpenAFS RPMs.

Version-Release number of selected component (if applicable):
RHEL 4 Update 2

How reproducible:
Reproduced on: i386, x86_64

Comment 1 Daniel Walsh 2005-10-06 21:44:46 UTC
You can either make some minor changes to policy to allow afs or grab a
pre-release of U3 policy from

ftp://people.redhat.com/dwalsh/SELinux/RHEL4/u3/selinux*

Or

Install selinux-targeted-policy-sources and add this to 

/etc/selinux/targeted/src/policy/domains/misc/local.te

allow initrc_t unlabeled_t:filesystem *;
genfscon afs /                          system_u:object_r:nfs_t


Comment 2 Daniel Walsh 2005-10-06 21:46:43 UTC
Fixed in selinux-policy-targeted-1.17.30.2.112

Comment 7 Red Hat Bugzilla 2006-03-07 18:11:51 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2006-0049.html