Bug 2196911 - selinux prevents nfs id mapping
Summary: selinux prevents nfs id mapping
Keywords:
Status: CLOSED DUPLICATE of bug 2180611
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 38
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-10 18:49 UTC by Marek Greško
Modified: 2023-05-11 06:52 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-05-11 06:52:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Marek Greško 2023-05-10 18:49:11 UTC
When you list files in the nfs directory on the nfs client, you see all the files owned by nobody. NFS ID mapping is not working. System is nearly unusable when home directories on nfs without switching to permissive mode.

You can see these logs:

AVC avc:  denied  { search } for  
pid=... comm="nfsidmap" name="sss" dev="dm-1" ino=... scontext=system_u:system_r:nfsidmap_t:s0 tcontext=system_u:object_r:sssd_var_lib_t:s0 tclass=dir permissive=1

AVC avc:  denied  { read } for  pid=... comm="nfsidmap" name="passwd" dev="dm-1" ino=... scontext=system_u:system_r:nfsidmap_t:s0 tcontext=system_u:object_r:sssd_public_t:s0 tclass=file permissive=1

AVC avc:  denied  { open } for  pid=... comm="nfsidmap" path="/var/lib/sss/mc/passwd" dev="dm-1" ino=... scontext=system_u:system_r:nfsidmap_t:s0 tcontext=system_u:object_r:sssd_public_t:s0 tclass=file permissive=1

AVC avc:  denied  { getattr } for  pid=... comm="nfsidmap" path="/var/lib/sss/mc/passwd" dev="dm-1" ino=... scontext=system_u:system_r:nfsidmap_t:s0 tcontext=system_u:object_r:sssd_public_t:s0 tclass=file permissive=1

AVC avc:  denied  { map } for  pid=... comm="nfsidmap" path="/var/lib/sss/mc/passwd" dev="dm-1" ino=... scontext=system_u:system_r:nfsidmap_t:s0 tcontext=system_u:object_r:sssd_public_t:s0 tclass=file permissive=1

AVC avc:  denied  { write } for  pid=... comm="nfsidmap" name="nss" dev="dm-1" ino=... scontext=system_u:system_r:nfsidmap_t:s0 tcontext=system_u:object_r:sssd_var_lib_t:s0 tclass=sock_file permissive=1

AVC avc:  denied  { connectto } for  pid=... comm="nfsidmap" path="/var/lib/sss/pipes/nss" scontext=system_u:system_r:nfsidmap_t:s0 tcontext=system_u:system_r:sssd_t:s0 tclass=unix_stream_socket permissive=1




Reproducible: Always

Steps to Reproduce:
1. Configure nfs client.
2. List directories on nfs share.
3. Files are displayed as owned by nobody.
Actual Results:  
Files are displayed as owned by nobody.

Expected Results:  
Correct file ownership displayed.

Comment 1 Zdenek Pytela 2023-05-11 06:52:54 UTC

*** This bug has been marked as a duplicate of bug 2180611 ***


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