From bbffd4213879046e6de907e810b2f620ef5e7b0c Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 28 Aug 2012 14:53:01 +0200 Subject: [PATCH] s3-smbd: Initialize the print backend after we setup winreg. The print backend init also migrates the printing tdb to winreg. For this we need to setup the winreg pipe first. Signed-off-by: Andreas Schneider Fix bug #9122 - winreg_printer_openkey: Could not open HKLM hive: NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE. (cherry picked from commit 0f1496516d4f4c3da0fb875e944b48861ef2330b) --- source3/smbd/server.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 9a8cdc0b60e..2400ce45a89 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -1228,9 +1228,6 @@ extern void build_options(bool screen); return -1; } - if (!print_backend_init(smbd_messaging_context())) - exit(1); - if (!init_guest_info()) { DEBUG(0,("ERROR: failed to setup guest info.\n")); return -1; @@ -1257,6 +1254,13 @@ extern void build_options(bool screen); exit(1); } + /* + * The print backend init also migrates the printing tdb's, + * this requires a winreg pipe. + */ + if (!print_backend_init(smbd_messaging_context())) + exit(1); + /* Publish nt printers, this requires a working winreg pipe */ pcap_cache_reload(server_event_context(), smbd_messaging_context(), &reload_printers); -- 2.11.4.GIT