[SCM] Samba Shared Repository - branch v3-6-test updated
Volker Lendecke
vlendec at samba.org
Tue Apr 5 05:36:06 MDT 2011
The branch, v3-6-test has been updated
via 38995cb s3: Make vlp printing work by default
via 1b80e06 s3: Fix print_spool_end
from 0c3a359 s3-net: add command "net idmap check"
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test
- Log -----------------------------------------------------------------
commit 38995cb98a01d01c683d19df5db21cc0faebad3b
Author: Volker Lendecke <vl at samba.org>
Date: Sat Apr 2 18:51:55 2011 +0200
s3: Make vlp printing work by default
Autobuild-User: Volker Lendecke <vlendec at samba.org>
Autobuild-Date: Tue Apr 5 13:12:14 CEST 2011 on sn-devel-104
(cherry picked from commit fe35ff2bf98c166b2f3bfbaa171a58727e1ba091)
commit 1b80e06e8e34a6febfe35d9ffd5592d5f6566729
Author: Volker Lendecke <vl at samba.org>
Date: Sat Apr 2 18:46:58 2011 +0200
s3: Fix print_spool_end
We have to use the spoolss pipe instance opened in print_spool_open, otherwise
the spoolss server won't be able to find the right printer and job.
(cherry picked from commit 0f08e9d92222b97cfea3fa5c9ac633790cc4f76d)
-----------------------------------------------------------------------
Summary of changes:
source3/param/loadparm.c | 63 ++++++++++++++++++++++++++++++++++-----
source3/printing/printspoolss.c | 12 -------
2 files changed, 55 insertions(+), 20 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 09f8458..b601932 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -4863,15 +4863,62 @@ static void init_printer_values(struct service *pService)
#if defined(DEVELOPER) || defined(ENABLE_BUILD_FARM_HACKS)
case PRINT_TEST:
- case PRINT_VLP:
- string_set(&pService->szPrintcommand, "vlp print %p %s");
- string_set(&pService->szLpqcommand, "vlp lpq %p");
- string_set(&pService->szLprmcommand, "vlp lprm %p %j");
- string_set(&pService->szLppausecommand, "vlp lppause %p %j");
- string_set(&pService->szLpresumecommand, "vlp lpresume %p %j");
- string_set(&pService->szQueuepausecommand, "vlp queuepause %p");
- string_set(&pService->szQueueresumecommand, "vlp queueresume %p");
+ case PRINT_VLP: {
+ const char *tdbfile;
+ char *tmp;
+
+ tdbfile = talloc_asprintf(
+ talloc_tos(), "tdbfile=%s",
+ lp_parm_const_string(-1, "vlp", "tdbfile",
+ "/tmp/vlp.tdb"));
+ if (tdbfile == NULL) {
+ tdbfile="tdbfile=/tmp/vlp.tdb";
+ }
+
+ tmp = talloc_asprintf(talloc_tos(), "vlp %s print %%p %%s",
+ tdbfile);
+ string_set(&pService->szPrintcommand,
+ tmp ? tmp : "vlp print %p %s");
+ TALLOC_FREE(tmp);
+
+ tmp = talloc_asprintf(talloc_tos(), "vlp %s lpq %%p",
+ tdbfile);
+ string_set(&pService->szLpqcommand,
+ tmp ? tmp : "vlp lpq %p");
+ TALLOC_FREE(tmp);
+
+ tmp = talloc_asprintf(talloc_tos(), "vlp %s lprm %%p %%j",
+ tdbfile);
+ string_set(&pService->szLprmcommand,
+ tmp ? tmp : "vlp lprm %p %j");
+ TALLOC_FREE(tmp);
+
+ tmp = talloc_asprintf(talloc_tos(), "vlp %s lppause %%p %%j",
+ tdbfile);
+ string_set(&pService->szLppausecommand,
+ tmp ? tmp : "vlp lppause %p %j");
+ TALLOC_FREE(tmp);
+
+ tmp = talloc_asprintf(talloc_tos(), "vlp %s lpresume %%p %%j",
+ tdbfile);
+ string_set(&pService->szLpresumecommand,
+ tmp ? tmp : "vlp lpresume %p %j");
+ TALLOC_FREE(tmp);
+
+ tmp = talloc_asprintf(talloc_tos(), "vlp %s queuepause %%p",
+ tdbfile);
+ string_set(&pService->szQueuepausecommand,
+ tmp ? tmp : "vlp queuepause %p");
+ TALLOC_FREE(tmp);
+
+ tmp = talloc_asprintf(talloc_tos(), "vlp %s queueresume %%p",
+ tdbfile);
+ string_set(&pService->szQueueresumecommand,
+ tmp ? tmp : "vlp queueresume %p");
+ TALLOC_FREE(tmp);
+
break;
+ }
#endif /* DEVELOPER */
}
diff --git a/source3/printing/printspoolss.c b/source3/printing/printspoolss.c
index d7ce971..6494fc5 100644
--- a/source3/printing/printspoolss.c
+++ b/source3/printing/printspoolss.c
@@ -276,18 +276,6 @@ void print_spool_end(files_struct *fsp, enum file_close_type close_type)
WERROR werr;
struct dcerpc_binding_handle *b = NULL;
- status = rpc_pipe_open_interface(fsp->conn,
- &ndr_table_spoolss.syntax_id,
- fsp->conn->session_info,
- &fsp->conn->sconn->client_id,
- fsp->conn->sconn->msg_ctx,
- &fsp->conn->spoolss_pipe);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("print_spool_end: "
- "Failed to get spoolss pipe [%s]\n",
- nt_errstr(status)));
- return;
- }
b = fsp->conn->spoolss_pipe->binding_handle;
switch (close_type) {
--
Samba Shared Repository
More information about the samba-cvs
mailing list