Bug 117685

Summary: symlink in /home is not handled correctly?
Product: [Fedora] Fedora Reporter: Aleksey Nogin <aleksey>
Component: policycoreutilsAssignee: Daniel Walsh <dwalsh>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideKeywords: SELinux
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-07-22 15:33:43 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:

Description Aleksey Nogin 2004-03-07 03:51:10 UTC
On my machine I have a symlink /home/nogin -> aleksey (this is useful
because my home dir on work machines is /home/nogin and the symlink
makes it easier to copy configs around).

For some reason the setfiles does not realize that /home/nogin is in
/home! It says:

% /usr/sbin/setfiles -d /etc/security/selinux/file_contexts /home/nogin
/usr/sbin/setfiles:  read 1224 specifications
/usr/sbin/setfiles:  labeling files under /home/nogin
/usr/sbin/setfiles:  /home/nogin matched by (/.*,system_u:object_r:file_t)
/usr/sbin/setfiles:  hash table stats: 1 elements, 1/65536 buckets
used, longest chain length 1
/usr/sbin/setfiles:  Done.

And then I see 

avc:  denied  { read } for  pid=2145
exe=/usr/lib/mozilla-1.7a/mozilla-bin name=nogin dev=hda2 ino=3777728
scontext=user_u:user_r:user_mozilla_t
tcontext=system_u:object_r:file_t tclass=lnk_file

(Mozilla's prefs.js is useng /home/nogin instead of /home/aleksey to
make it easier to copy setiings between work and home).

I currently have policycoreutils-1.6-4 policy-1.7-8

Comment 1 Daniel Walsh 2004-03-18 05:10:53 UTC
Tryout policy-1.9-1  

Comment 2 Aleksey Nogin 2004-03-20 21:01:40 UTC
policy-1.9-5:

audit(1079814849.738:0): avc:  denied  { read } for  pid=2237
exe=/usr/lib/mozilla-1.6/mozilla-bin name=nogin dev=hda2 ino=3777728
scontext=aleksey:staff_r:staff_mozilla_t
tcontext=system_u:object_r:default_t tclass=lnk_file