[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Sat Sep 18 00:54:01 UTC 2021


The branch, master has been updated
       via  cf4a868be50 debug: Remove "override_logfile"
       via  48521736b4c smbtorture: Fix epmapper.Map_full test
      from  8d5534d2369 lib/tsocket: Fix build on Freebsd

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit cf4a868be50e795889b76b59f7fbe1cca51bcbfa
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Sep 17 10:22:29 2021 +0200

    debug: Remove "override_logfile"
    
    The only writer to this variable left with c377845d27d4dcd7. The
    closest match for override_logfile is is_default_dyn_LOGFILEBASE()
    with the opposite logic.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Sat Sep 18 00:53:28 UTC 2021 on sn-devel-184

commit 48521736b4c40c05237a2a6f0e81e173be36154d
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Sep 10 12:22:46 2021 +0200

    smbtorture: Fix epmapper.Map_full test
    
    For detailed knownfail on subtests we need torture_assert() calls
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 lib/util/debug.c                 | 10 ----------
 source3/nmbd/nmbd.c              |  4 +---
 source3/winbindd/winbindd.c      |  4 +---
 source3/winbindd/winbindd_cm.c   |  1 -
 source3/winbindd/winbindd_dual.c | 18 +++++++++---------
 source4/torture/rpc/epmapper.c   | 12 +++---------
 6 files changed, 14 insertions(+), 35 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/debug.c b/lib/util/debug.c
index cd52fe4be77..4fd17679227 100644
--- a/lib/util/debug.c
+++ b/lib/util/debug.c
@@ -583,16 +583,6 @@ static void debug_backends_log(const char *msg, int msg_level)
 	}
 }
 
-/* -------------------------------------------------------------------------- **
- * External variables.
- */
-
-/*
-   used to check if the user specified a
-   logfile on the command line
-*/
-bool    override_logfile;
-
 int debuglevel_get_class(size_t idx)
 {
 	return dbgc_config[idx].loglevel;
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index d43c52bb406..44121e9915c 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -37,8 +37,6 @@ int global_nmb_port = -1;
 extern bool rescan_listen_set;
 extern bool global_in_nmbd;
 
-extern bool override_logfile;
-
 /* have we found LanMan clients yet? */
 bool found_lm_clients = False;
 
@@ -857,7 +855,7 @@ static bool open_sockets(bool isdaemon, int port)
 
 	sys_srandom(time(NULL) ^ getpid());
 
-	if (!override_logfile) {
+	if (is_default_dyn_LOGFILEBASE()) {
 		char *lfile = NULL;
 		if (asprintf(&lfile, "%s/log.nmbd", get_dyn_LOGFILEBASE()) < 0) {
 			exit(1);
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index 8c35b8eae76..25d8b723010 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -64,8 +64,6 @@ static void winbindd_setup_max_fds(void);
 static bool opt_nocache = False;
 static bool interactive = False;
 
-extern bool override_logfile;
-
 struct imessaging_context *winbind_imessaging_context(void)
 {
 	static struct imessaging_context *msg = NULL;
@@ -1718,7 +1716,7 @@ int main(int argc, const char **argv)
 
 	poptFreeContext(pc);
 
-	if (!override_logfile) {
+	if (is_default_dyn_LOGFILEBASE()) {
 		char *lfile = NULL;
 		if (asprintf(&lfile,"%s/log.winbindd",
 				get_dyn_LOGFILEBASE()) > 0) {
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index a915f803518..3f46c6f4dad 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -98,7 +98,6 @@ struct dc_name_ip {
 };
 
 extern struct winbindd_methods reconnect_methods;
-extern bool override_logfile;
 
 static NTSTATUS init_dc_connection_network(struct winbindd_domain *domain, bool need_rw_dc);
 static void set_dc_type_and_flags( struct winbindd_domain *domain );
diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c
index 5006d6af096..e19dfafc52f 100644
--- a/source3/winbindd/winbindd_dual.c
+++ b/source3/winbindd/winbindd_dual.c
@@ -47,8 +47,6 @@
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_WINBIND
 
-extern bool override_logfile;
-
 static void forall_domain_children(bool (*fn)(struct winbindd_child *c,
 					      void *private_data),
 				   void *private_data)
@@ -1546,16 +1544,17 @@ NTSTATUS winbindd_reinit_after_fork(const struct winbindd_child *myself,
 
 	close_conns_after_fork();
 
-	if (!override_logfile && logfilename) {
+	if (is_default_dyn_LOGFILEBASE() && logfilename) {
 		lp_set_logfile(logfilename);
 		reopen_logs();
 	}
 
 	if (!winbindd_setup_sig_term_handler(false))
 		return NT_STATUS_NO_MEMORY;
-	if (!winbindd_setup_sig_hup_handler(override_logfile ? NULL :
-					    logfilename))
+	if (!winbindd_setup_sig_hup_handler(
+		    !is_default_dyn_LOGFILEBASE() ? NULL : logfilename)) {
 		return NT_STATUS_NO_MEMORY;
+	}
 
 	/* Stop zombies in children */
 	CatchChild();
@@ -1776,10 +1775,11 @@ static bool fork_domain_child(struct winbindd_child *child)
 	messaging_register(global_messaging_context(), NULL,
 			   MSG_WINBIND_DISCONNECT_DC,
 			   winbind_msg_disconnect_dc);
-	messaging_register(global_messaging_context(),
-			   override_logfile ? NULL : child->logfilename,
-			   MSG_SMB_CONF_UPDATED,
-			   winbindd_msg_reload_services_child);
+	messaging_register(
+		global_messaging_context(),
+		!is_default_dyn_LOGFILEBASE() ? NULL : child->logfilename,
+		MSG_SMB_CONF_UPDATED,
+		winbindd_msg_reload_services_child);
 
 	primary_domain = find_our_domain();
 
diff --git a/source4/torture/rpc/epmapper.c b/source4/torture/rpc/epmapper.c
index be0acc0946e..72b5165c6e8 100644
--- a/source4/torture/rpc/epmapper.c
+++ b/source4/torture/rpc/epmapper.c
@@ -251,19 +251,13 @@ static bool test_Map_full(struct torture_context *tctx,
 	torture_assert_ntstatus_ok(tctx, status, "dcerpc_binding_set_abstract_syntax");
 
 	ok = test_Insert(tctx, h, obj, annotation, b);
-	if (!ok) {
-		return false;
-	}
+	torture_assert(tctx, ok, "test_Insert failed");
 
 	ok = test_Map_tcpip(tctx, h, obj);
-	if (!ok) {
-		return false;
-	}
+	torture_assert(tctx, ok, "test_Map_tcpip failed");
 
 	ok = test_Delete(tctx, h, annotation, b);
-	if (!ok) {
-		return false;
-	}
+	torture_assert(tctx, ok, "test_Delete failed");
 
 	return true;
 }


-- 
Samba Shared Repository



More information about the samba-cvs mailing list