From 94643706edf6e5f613e6ab0253a3d0d50b57e5c8 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 28 Aug 2012 14:53:01 +0200 Subject: [PATCH 2/2] 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 --- 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 9a8cdc0..2400ce4 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); -- 1.7.11.5