Bug 16019 - incorrect behavior on rpcclient enumport with rpcd_spoolss
Summary: incorrect behavior on rpcclient enumport with rpcd_spoolss
Status: REOPENED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: DCE-RPCs and pipes (show other bugs)
Version: 4.24.0rc*
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba release manager
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-03-09 16:04 UTC by Denis Cardon
Modified: 2026-04-09 09:35 UTC (History)
2 users (show)

See Also:


Attachments
Patch (859 bytes, patch)
2026-03-10 10:01 UTC, Volker Lendecke
no flags Details
Patch from master (1.08 KB, patch)
2026-03-13 09:19 UTC, Volker Lendecke
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Cardon 2026-03-09 16:04:52 UTC
Hi everyone,

This is not a security vulnerability or bug per se, but it make false positive alerts during security. Print spool server shouldn't be enabled on domain controller, it can be a real security issue on MS-AD.

On Samba-AD, when adding "disable spoolss = yes", print spooling is disabled, but it still register as up and running when doing a rpcclient enumports.

Step to reproduce: 
* add "disable spoolss = yes" to [global] in smb.conf

* restart samba server

* run rpcclient 

[root@srvads1.mydomain.lan ~]# 'rpcclient -U administrator localhost 
Password for [MYDOMAIN\administrator]: 
rpcclient $> enumports
        Port Name:        [Samba Printer Port]


Possible workaround is just to delete the file
* rm -f /usr/libexec/samba/rpcd_spoolss

I choose "DCE-RPC and pipes" as a category rather than "printing", as it is not really a printing bug, and nobody like printing anyway... :-)
Comment 1 Volker Lendecke 2026-03-10 10:01:36 UTC
Created attachment 18882 [details]
Patch

This should help, pushing this to gitlab now
Comment 2 Samba QA Contact 2026-03-13 09:01:03 UTC
This bug was referenced in samba master:

8497fb05d8d9c082b7ba318844970f0b3227aff9
Comment 3 Volker Lendecke 2026-03-13 09:19:11 UTC
Created attachment 18899 [details]
Patch from master

Should apply back to all supported versions
Comment 4 Samba QA Contact 2026-03-13 13:59:20 UTC
This bug was referenced in samba v4-24-test:

9ea92994deb4edd7fadb769bd782231f5304207b
Comment 5 Samba QA Contact 2026-03-18 10:31:08 UTC
This bug was referenced in samba v4-24-stable (Release samba-4.24.0):

9ea92994deb4edd7fadb769bd782231f5304207b
Comment 6 Samba QA Contact 2026-04-08 17:41:36 UTC
This bug was referenced in samba v4-22-test:

27dad685330bc67bb7c6306ab187a734c35edf3e
Comment 7 Samba QA Contact 2026-04-09 09:35:50 UTC
This bug was referenced in samba v4-22-stable (Release samba-4.22.9):

27dad685330bc67bb7c6306ab187a734c35edf3e