Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2097789

Summary: [RHEL9]: avc: denied { connectto } for pid=78486 comm="rpcd_classic"
Product: Red Hat Enterprise Linux 9 Reporter: xiaoli feng <xifeng>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED DUPLICATE QA Contact: Milos Malik <mmalik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.1CC: lvrabec, mmalik, ssekidde
Target Milestone: rcKeywords: Regression
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 2097942 (view as bug list) Environment:
Last Closed: 2022-06-16 15:22:58 UTC Type: Bug
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: 2097942    

Description xiaoli feng 2022-06-16 14:50:30 UTC
Description of problem:
When execute "smbclient -L //$SERVER/testuser -N", Selinux always print avc denied.

[root@sweetpig-11 cthon04]# smbclient -L //sweetpig-11.4a2m.lab.eng.bos.redhat.com/testuser  -N
Anonymous login successful

	Sharename       Type      Comment
	---------       ----      -------
	testuser        Disk      
	IPC$            IPC       IPC Service (Samba 4.16.1)
SMB1 disabled -- no workgroup available
[root@sweetpig-11 cthon04]# ausearch -m avc
----
time->Thu Jun 16 05:01:54 2022
type=PROCTITLE msg=audit(1655370114.462:794): proctitle=2F7573722F6C6962657865632F73616D62612F727063645F636C6173736963002D2D636F6E66696766696C653D2F6574632F73616D62612F736D622E636F6E66002D2D776F726B65722D67726F75703D32002D2D776F726B65722D696E6465783D30002D2D64656275676C6576656C3D30
type=SYSCALL msg=audit(1655370114.462:794): arch=c000003e syscall=42 success=yes exit=0 a0=11 a1=558e96696540 a2=6e a3=7fd0699b0bb4 items=0 ppid=78476 pid=78486 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="rpcd_classic" exe="/usr/libexec/samba/rpcd_classic" subj=system_u:system_r:winbind_rpcd_t:s0 key=(null)
type=AVC msg=audit(1655370114.462:794): avc:  denied  { connectto } for  pid=78486 comm="rpcd_classic" path="/run/samba/ncalrpc/np/winreg" scontext=system_u:system_r:winbind_rpcd_t:s0 tcontext=system_u:system_r:winbind_rpcd_t:s0 tclass=unix_stream_socket permissive=1

[root@sweetpig-11 ~]# cat /etc/samba/smb.conf
[testuser]
	path = /mnt/cifs
	writeable=yes

[root@sweetpig-11 ~]# getenforce 
Permissive

This issue is included from selinux-policy-34.1.34-1.el9.noarch. Doesn't have this issue in selinux-policy-34.1.33-1.el9.noarch.

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

selinux-policy-34.1.34-1.el9.noarch
samba-4.16.1-100.el9.x86_64
5.14.0-109.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
1. systemctl start smb
2. smbclient -L //sweetpig-11.4a2m.lab.eng.bos.redhat.com/testuser  -N
3.

Actual results:
Selinux print avc denied when execute "smbclient -L".

Expected results:
Selinux doesn't print avc denied when execute "smbclient -L".

Additional info:

Comment 1 Milos Malik 2022-06-16 15:22:58 UTC

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