[Samba] Samba-CUPS interface
henri transfert
hb.transfert at gmail.com
Mon Sep 5 08:11:57 UTC 2016
2016-09-04 15:22 GMT+04:00 Andrew Bartlett <abartlet at samba.org>:
> 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
> print_cups.c:
>
> new_jobname = talloc_asprintf(frame,
> "%s%.8u %s", PRINT_SPOOL_PREFIX,
> pjob->jobid, jobname);
> if (new_jobname == NULL) {
> goto out;
> }
>
> Andrew Bartlett
>
Hi Andrew,
You are right, I have thought also about this solution of modifying Samba
source code.
BUT , I wonder :
- if there could be any side effect on Samba and/or CUPS ?
- if it is a good idea to modify Samba source code , and to not forget to
redo the modification after all upgrade operation in the future. That's not
very clean.
Anyway, I will just have a test, to validate the idea.
Thanks you.
Henri
More information about the samba
mailing list