The Samba-Bugzilla – Attachment 14237 Details for
Bug 13457
Setting DELETE_ON_CLOSE on a print file handle should cancel (lprm) the job.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.7.next.
0001-s3-smbd-printing-Re-implement-delete-on-close-semant.patch (text/plain), 1.57 KB, created by
Jeremy Allison
on 2018-06-15 17:56:26 UTC
(
hide
)
Description:
git-am fix for 4.7.next.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2018-06-15 17:56:26 UTC
Size:
1.57 KB
patch
obsolete
>From 31b40b387aea44fb70a9179c4170a8c34211129a Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Thu, 31 May 2018 10:35:48 -0700 >Subject: [PATCH] s3: smbd: printing: Re-implement delete-on-close semantics > for print files missing since 3.5.x. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=13457 > >Signed-off-by: Jeremy Allison <jra@samba.org> >Reviewed-by: Andreas Schneider <asn@samba.org> > >Autobuild-User(master): Jeremy Allison <jra@samba.org> >Autobuild-Date(master): Fri Jun 1 20:32:03 CEST 2018 on sn-devel-144 > >(cherry picked from commit 364175b359f018c8641359440fa07b0ea567b045) >--- > source3/printing/printspoolss.c | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > >diff --git a/source3/printing/printspoolss.c b/source3/printing/printspoolss.c >index 60002020351..9d565de120a 100644 >--- a/source3/printing/printspoolss.c >+++ b/source3/printing/printspoolss.c >@@ -309,6 +309,23 @@ void print_spool_end(files_struct *fsp, enum file_close_type close_type) > WERROR werr; > struct dcerpc_binding_handle *b = NULL; > >+ if (fsp->fh->private_options & >+ NTCREATEX_OPTIONS_PRIVATE_DELETE_ON_CLOSE) { >+ int ret; >+ >+ /* >+ * Job was requested to be cancelled by setting >+ * delete on close so truncate the job file. >+ * print_job_end() which is called from >+ * _spoolss_EndDocPrinter() will take >+ * care of deleting it for us. >+ */ >+ ret = ftruncate(fsp->fh->fd, 0); >+ if (ret == -1) { >+ DBG_ERR("ftruncate failed: %s\n", strerror(errno)); >+ } >+ } >+ > b = fsp->conn->spoolss_pipe->binding_handle; > > switch (close_type) { >-- >2.18.0.rc1.244.gcf134e6275-goog >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
asn
:
review+
Actions:
View
Attachments on
bug 13457
:
14236
| 14237