Bug #13745


Make SMBsrv compatible with Modern Cups/ OpenPrinting Cups

Added by Till Wegmüller 14 days ago. Updated about 18 hours ago.

cifs - CIFS server and client
Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:


Our SMB server is using a deprecated interface in IPP to print. This has been removed in cups 2.3 and thus SMB_PRINTING does not compile anymore. In OmniOS IPP Prinitng is implicitly disabled and in OpenIndiana It is now explicitly disabled.

What also happened, is that Apple has not updated Cups in a while and an organization called OpenPrinting has forked the project on Github: The OpenPrinting folks are fixing several CVE's and patches and are much better as an upstream as Apple, but illumos-gate does not build against a modern enough cups.

According to The code on Github from Apple (
"Removed support for -D_IPP_PRIVATE_STRUCTURES=1 developer cheat - the IPP accessor functions should be used instead."

So we need to port our code to use the accessor functions instead,

Currently, to make a release we disabled printing support for SMB

Currently, it looks like the Printing support for SMB is not tested anymore outside of OI.

Testing by Toomas Soome: I have defined printer in cups ("epson"), so I did build the gate with this patch and installed it. Then I did create print$ share with: zfs set sharesmb=name=print$ rpool/export/print and made sure sharectl does show print_enable=true for smb protocol.

After this, windows 10 did start to show "epson" in shares list, I did add it as printer in windows and did print test page. Nothing did appear on printer. I found the data file in /export/print drectory; lpr from OI did send it to printer and it was wiondows test page. Then I found entry from log:

May  5 20:48:11 beastie smbd[1175]: [ID 856668 daemon.error] smbd_spool_copyfile: printer Postscript: client-error-not-found

Apparently smbd is looking for printer "Postscript", so I did create printer with this name (my epson is networked, adding another queue is trivial). After this, windows print jobs are sent via illumos smb service to printer.

Actions #1

Updated by Till Wegmüller 14 days ago

In IRC multiple other options where suggested:

- Move the only the Printing feature out of tree and make a "plugin" with a private interface

- Deprecate the feature.

Actions #2

Updated by Andy Fiddaman 13 days ago

I think the best option is to make the changes in gate so that it works with newer cups, then re-enable the integration in OpenIndiana.

I took a quick look and the updates should be pretty minimal - something like:

It's the same kind of thing we encounter fairly frequently with OmniOS. It's not uncommon that upgrading something like, for example, glib2 or openssl, requires some corresponding updates in gate. They are usually pretty small like this.

Actions #3

Updated by Till Wegmüller 13 days ago

Something like but we need somebody to work on it more :)

==== Build errors (non-DEBUG) ====

smbd_spool.c:235:27: error: 'smb_cups_ops_t {aka struct smb_cups_ops}' has no member named 'ippNewRequest'
smbd_spool.c:283:42: error: 'smb_cups_ops_t {aka struct smb_cups_ops}' has no member named 'ippGetStatusCode'
dmake: Warning: Target `install' not remade because of errors
The following command caused the error:
dmake: Warning: Target `install' not remade because of errors
dmake: Warning: Command failed for target `smbsrv'
dmake: Warning: Target `install' not remade because of errors
The following command caused the error:
dmake: Warning: Target `install' not remade because of errors
Actions #4

Updated by Electric Monk 8 days ago

  • Gerrit CR set to 1452
Actions #5

Updated by Toomas Soome about 18 hours ago

  • Description updated (diff)
Actions #6

Updated by Gordon Ross about 18 hours ago

The interface between the SMB/RPC print service and CUPS could use work,
but it's likely to be a while before anyone has time to work on it.

Most distros just comment out the line:
in usr/src/tools/env/

That not work for you? (at least until the i/f can get updated)


Also available in: Atom PDF