1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s3: remove now unneeded call to cmdline_messaging_context()

This was only needed as dbwrap_open() had a bug where it asked for the ctdb
connection before initializing messaging. The previous commit fixed that so we
can now safely remove the calls to cmdline_messaging_context() from all tools
that don't use messaging.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13925

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Oct 24 09:33:47 UTC 2019 on sn-devel-184
This commit is contained in:
Ralph Boehme 2019-05-04 12:12:48 +02:00 committed by Jeremy Allison
parent ca95d7f41b
commit 9471508391
9 changed files with 0 additions and 23 deletions

View File

@ -102,15 +102,8 @@ static void popt_common_credentials_callback(poptContext con,
}
if (reason == POPT_CALLBACK_REASON_POST) {
struct messaging_context *msg_ctx = NULL;
bool ok;
msg_ctx = cmdline_messaging_context(get_dyn_CONFIGFILE());
if (msg_ctx == NULL) {
fprintf(stderr, "Unable to initialize "
"messaging context\n");
}
ok = lp_load_client(get_dyn_CONFIGFILE());
if (!ok) {
const char *pname = poptGetInvocationName(con);

View File

@ -422,8 +422,6 @@ int main(int argc, const char **argv)
while (extra_argv[extra_argc]) extra_argc++;
}
cmdline_messaging_context(get_dyn_CONFIGFILE());
lp_load_global(get_dyn_CONFIGFILE());
if ((extra_argc < 2) || (extra_argc > 5)) {

View File

@ -473,9 +473,6 @@ int main( int argc, char *argv[] )
exit( 1 );
}
cmdline_messaging_context(configfile == NULL ?
get_dyn_CONFIGFILE() : configfile);
if ( configfile == NULL ) {
lp_load_global(get_dyn_CONFIGFILE());
} else if (!lp_load_global(configfile)) {

View File

@ -2544,8 +2544,6 @@ enum {
poptFreeContext(pc);
cmdline_messaging_context(get_dyn_CONFIGFILE());
if (!lp_load_global(get_dyn_CONFIGFILE())) {
d_fprintf(stderr, "ntlm_auth: error opening config file %s. Error was %s\n",
get_dyn_CONFIGFILE(), strerror(errno));

View File

@ -1128,8 +1128,6 @@ int main(int argc, const char **argv)
if (user_name == NULL)
user_name = poptGetArg(pc);
cmdline_messaging_context(get_dyn_CONFIGFILE());
if (!lp_load_global(get_dyn_CONFIGFILE())) {
fprintf(stderr, "Can't load %s - run testparm to debug it\n", get_dyn_CONFIGFILE());
exit(1);

View File

@ -501,7 +501,6 @@ int main(int argc, const char *argv[])
setlinebuf(stdout);
cmdline_messaging_context(get_dyn_CONFIGFILE());
lp_load_with_registry_shares(get_dyn_CONFIGFILE());
/* check for initializing secrets.tdb first */

View File

@ -1007,8 +1007,6 @@ int main(int argc, char **argv)
popt_burn_cmdline_password(argc, argv);
cmdline_messaging_context(get_dyn_CONFIGFILE());
if (smbc_init(get_auth_data, opt.debuglevel) < 0) {
fprintf(stderr, "Unable to initialize libsmbclient\n");
ret= 1;

View File

@ -197,8 +197,6 @@ static int process_options(int argc, char **argv, int local_flags)
usage();
}
cmdline_messaging_context(configfile);
if (!lp_load_global(configfile)) {
fprintf(stderr, "Can't load %s - run testparm to debug it\n",
configfile);

View File

@ -742,8 +742,6 @@ static void do_per_share_checks(int s)
goto done;
}
cmdline_messaging_context(config_file);
fprintf(stderr,"Load smb config files from %s\n",config_file);
if (!lp_load_with_registry_shares(config_file)) {