From 8b60e98061c86984e3bc3f6c248e2bc835134acb 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 Fix bug #8845 (check_published_printers: Could not create system session_info). (cherry picked from commit 3bdcf3208c8ff1a99bc457549257af83a869b381) --- source3/smbd/server.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 28bb9478d9f..8cda180f690 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -1209,9 +1209,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 @@ -1228,6 +1225,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; -- 2.11.4.GIT