The Samba-Bugzilla – Attachment 14281 Details for
Bug 13465
testparm crashes with PANIC: messaging not initialized on SLES 12 SP3
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Possible patch for master
bug13465-master.patch (text/plain), 1.87 KB, created by
Ralph Böhme
on 2018-07-05 12:43:11 UTC
(
hide
)
Description:
Possible patch for master
Filename:
MIME Type:
Creator:
Ralph Böhme
Created:
2018-07-05 12:43:11 UTC
Size:
1.87 KB
patch
obsolete
>From 2b9c4772386e12fb39673e31f01aab1f0fc157c4 Mon Sep 17 00:00:00 2001 >From: Ralph Boehme <slow@samba.org> >Date: Thu, 5 Jul 2018 14:38:59 +0200 >Subject: [PATCH] s3: testparm: initialize messaging, needed for registry > config > >This fixes a crash triggered by running testparm with registry config >enabled in smb.conf, eg by "include = registry". > >Registry config calls db_open() and that requires messaging to be up and >running on a cluster. > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=13465 > >Signed-off-by: Ralph Boehme <slow@samba.org> >--- > source3/utils/testparm.c | 24 ++++++++++++++++++++++++ > 1 file changed, 24 insertions(+) > >diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c >index 8113eea0020..61940959f84 100644 >--- a/source3/utils/testparm.c >+++ b/source3/utils/testparm.c >@@ -35,6 +35,7 @@ > #include "system/filesys.h" > #include "popt_common.h" > #include "lib/param/loadparm.h" >+#include "messages.h" > > #include <regex.h> > >@@ -646,6 +647,8 @@ static void do_per_share_checks(int s) > const char *caddr; > static int show_defaults; > static int skip_logic_checks = 0; >+ struct tevent_context *ev = NULL; >+ struct messaging_context *msg_ctx = NULL; > > struct poptOption long_options[] = { > POPT_AUTOHELP >@@ -698,6 +701,27 @@ static void do_per_share_checks(int s) > goto done; > } > >+ if (!lp_load_initial_only(get_dyn_CONFIGFILE())) { >+ fprintf(stderr, "Can't load %s - run testparm to debug it\n", >+ get_dyn_CONFIGFILE()); >+ ret = -1; >+ goto done; >+ } >+ >+ ev = samba_tevent_context_init(frame); >+ if (ev == NULL) { >+ fprintf(stderr, "samba_tevent_context_init failed\n"); >+ ret = -1; >+ goto done; >+ } >+ >+ msg_ctx = messaging_init(ev, ev); >+ if (msg_ctx == NULL) { >+ fprintf(stderr, "messaging_init failed\n"); >+ ret = -1; >+ goto done; >+ } >+ > fprintf(stderr,"Load smb config files from %s\n",config_file); > > if (!lp_load_with_registry_shares(config_file)) { >-- >2.13.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 13465
:
14224
|
14264
| 14281 |
14511
|
14512
|
14513