From 71fd0686214bb09ce099585ad5088f240ac78ca9 Mon Sep 17 00:00:00 2001 From: Ralph Wuerthner Date: Wed, 4 Apr 2012 17:40:27 +0200 Subject: [PATCH] s3-smbd: move print_backend_init() behind init_system_info() On smbd startup check_published_printers() fails with the following error messages: [2012/04/04 16:29:50.511526, 0] printing/nt_printing_ads.c:360(check_published_printers) check_published_printers: Could not create system session_info [2012/04/04 16:29:50.512101, 0] printing/nt_printing.c:102(nt_printing_init) nt_printing_init: error checking published printers: WERR_ACCESS_DENIED check_published_printers() requires session_info to be set, but initialization of session_info in main() is done after calling print_backend_init(). Move print_backend_init() behind init_system_info(). Signed-off-by: Ralph Wuerthner --- source3/smbd/server.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source3/smbd/server.c b/source3/smbd/server.c index db68ace..1d8283e 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -1211,9 +1211,6 @@ extern void build_options(bool screen); if (!W_ERROR_IS_OK(registry_init_full())) exit(1); - if (!print_backend_init(smbd_messaging_context())) - exit(1); - /* Open the share_info.tdb here, so we don't have to open after the fork on every single connection. This is a small performance improvment and reduces the total number of system @@ -1230,6 +1227,9 @@ 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; -- 1.7.5.4