[Samba] Samba-CUPS interface

Andrew Bartlett abartlet at samba.org
Sun Sep 4 11:22:18 UTC 2016

On Fri, 2016-09-02 at 11:59 +0400, henri transfert via samba wrote:
> Hi,
> One of our Samba server (4.4.5) is a print server with CUPS backend .
> In
> addition we are using a print management product that is itself a
> backend
> to cups.
> Everything works well, except that the document names that are
> transmitted
> in the chain is of the form : "smbprn.00000648 MyDocument.pdf" . I
> guess
> that the prefix smbprn.00000648 is the samba job ID that is
> concatenated to
> the file name , that is itself transmitted to cups, and then to our
> third
> party product.
> Is cups able to separate the job ID and the original filename ? I did
> not
> find any parameter in cups about that.
> Is it possible in Samba to remove this prefix to the file name that
> is
> passed to cups ?

I don't see an option for that, but I also don't see any indication
that we reverse parse that string, we use the job-id to track the job. 

So my untested suggestion is that we/you could remove it from this in

	new_jobname = talloc_asprintf(frame,
			"%s%.8u %s", PRINT_SPOOL_PREFIX,
			pjob->jobid, jobname);
	if (new_jobname == NULL) {
		goto out;

Andrew Bartlett
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba

More information about the samba mailing list