[SCM] Samba Shared Repository - branch master updated

Björn Jacke bjacke at samba.org
Sun Jul 2 17:43:01 UTC 2023


The branch, master has been updated
       via  3119f6c283a wb_dsgetdcname: don't use stack variables for async code
       via  3b96ef92907 wb_dsgetdcname: log also the domain name for failures
       via  7475df4f87a wb_dsgetdcname.c: move common message to higher log level
       via  d6bee92ec5d wb_dsgetdcname.c: don't use statis log level numbers
       via  868db989805 tallocmsg.c: move info log message to appropriate level
       via  405e9ba5511 garbage_collect_tombstone.c: use DBG* macros instead of static numeric log levels
       via  e4bb8b3d0df garbage_collect_tombstones.c: move info log message to appropriate level
       via  bd87991c185 winbindd_cache.c: use DBG* macros instead of static log level numbers
       via  7395c114609 winbindd_cache.c: move some some notice messages from ERR to NOTICE level
       via  7f62b15cbda winbindd_cache: adjust some debug levels to more appropriate severities
      from  acd081a70d2 build: Remove unused check for SHA1_Update and SHA1_RENAME_NEEDED

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


- Log -----------------------------------------------------------------
commit 3119f6c283ace04b7877be3738891bec27daf66c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jun 29 14:02:17 2023 +0200

    wb_dsgetdcname: don't use stack variables for async code
    
    This is not really a problem because we call ndr_push from
    with a _send() function, but still we leave dangling pointers
    arround...
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Björn Jacke <bjacke at samba.org>
    
    Autobuild-User(master): Björn Jacke <bjacke at samba.org>
    Autobuild-Date(master): Sun Jul  2 17:42:56 UTC 2023 on atb-devel-224

commit 3b96ef9290737ea638b1878361c6190b7fa24a4b
Author: Björn Jacke <bj at sernet.de>
Date:   Thu Jun 29 13:51:46 2023 +0200

    wb_dsgetdcname: log also the domain name for failures
    
    Signed-off-by: Björn Jacke <bjacke at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit 7475df4f87a5061e84fec67702848d5a87f451e9
Author: Björn Jacke <bj at sernet.de>
Date:   Wed Jun 28 13:56:53 2023 +0200

    wb_dsgetdcname.c: move common message to higher log level
    
    Signed-off-by: Bjoern Jacke <bjacke at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit d6bee92ec5d599c7ae7a9a99b2a6a4720cdd024d
Author: Björn Jacke <bj at sernet.de>
Date:   Wed Jun 28 13:51:35 2023 +0200

    wb_dsgetdcname.c: don't use statis log level numbers
    
    Signed-off-by: Bjoern Jacke <bjacke at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 868db989805932bf49d0c0fbd01eae09f6393da9
Author: Björn Jacke <bj at sernet.de>
Date:   Wed Jun 28 13:24:50 2023 +0200

    tallocmsg.c: move info log message to appropriate level
    
    Signed-off-by: Bjoern Jacke <bjacke at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 405e9ba551148aadc5a368ba94bc8784e566d3a3
Author: Björn Jacke <bj at sernet.de>
Date:   Wed Jun 28 13:12:17 2023 +0200

    garbage_collect_tombstone.c: use DBG* macros instead of static numeric log levels
    
    Some log levels changed slightly because the macros don't cover all the
    previously used levels.
    
    Signed-off-by: Bjoern Jacke <bjacke at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit e4bb8b3d0df7d45db19b1424164f53c584c0cebf
Author: Björn Jacke <bj at sernet.de>
Date:   Wed Jun 28 12:55:35 2023 +0200

    garbage_collect_tombstones.c: move info log message to appropriate level
    
    Signed-off-by: Bjoern Jacke <bjacke at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit bd87991c1859fa35f3265082ba73a75a622f2dfd
Author: Björn Jacke <bj at sernet.de>
Date:   Wed Jun 28 12:34:26 2023 +0200

    winbindd_cache.c: use DBG* macros instead of static log level numbers
    
    Some log levels changed slightly because the macros don't cover all the
    previously used levels.
    
    Signed-off-by: Bjoern Jacke <bjacke at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 7395c1146094d9eb2a8cf33445aa668c3079e889
Author: Björn Jacke <bj at sernet.de>
Date:   Wed Jun 28 12:00:49 2023 +0200

    winbindd_cache.c: move some some notice messages from ERR to NOTICE level
    
    Signed-off-by: Bjoern Jacke <bjacke at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 7f62b15cbdad52956c95aa6630bd95c49f65c1f7
Author: Björn Jacke <bj at sernet.de>
Date:   Wed Jun 28 11:52:32 2023 +0200

    winbindd_cache: adjust some debug levels to more appropriate severities
    
    Signed-off-by: Bjoern Jacke <bjacke at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

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

Summary of changes:
 source3/lib/tallocmsg.c                       |   2 +-
 source3/winbindd/wb_dsgetdcname.c             |  23 +-
 source3/winbindd/winbindd_cache.c             | 437 +++++++++++++-------------
 source4/dsdb/kcc/garbage_collect_tombstones.c |  28 +-
 4 files changed, 250 insertions(+), 240 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/tallocmsg.c b/source3/lib/tallocmsg.c
index e8a69afbf80..af5a90bb434 100644
--- a/source3/lib/tallocmsg.c
+++ b/source3/lib/tallocmsg.c
@@ -81,5 +81,5 @@ void register_msg_pool_usage(
 		DBG_WARNING("messaging_filtered_read_send failed\n");
 		return;
 	}
-	DEBUG(2, ("Registered MSG_REQ_POOL_USAGE\n"));
+	DBG_INFO("Registered MSG_REQ_POOL_USAGE\n");
 }
diff --git a/source3/winbindd/wb_dsgetdcname.c b/source3/winbindd/wb_dsgetdcname.c
index ab9be5b5a1b..0f6acaae04a 100644
--- a/source3/winbindd/wb_dsgetdcname.c
+++ b/source3/winbindd/wb_dsgetdcname.c
@@ -24,6 +24,8 @@
 #include "lib/gencache.h"
 
 struct wb_dsgetdcname_state {
+	const char *domain_name;
+	struct GUID domain_guid;
 	struct netr_DsRGetDCNameInfo *dcinfo;
 };
 
@@ -39,7 +41,6 @@ struct tevent_req *wb_dsgetdcname_send(TALLOC_CTX *mem_ctx,
 	struct tevent_req *req, *subreq;
 	struct wb_dsgetdcname_state *state;
 	struct dcerpc_binding_handle *child_binding_handle = NULL;
-	struct GUID guid;
 	struct GUID *guid_ptr = NULL;
 
 	req = tevent_req_create(mem_ctx, &state, struct wb_dsgetdcname_state);
@@ -85,8 +86,13 @@ struct tevent_req *wb_dsgetdcname_send(TALLOC_CTX *mem_ctx,
 
 	if (domain_guid != NULL) {
 		/* work around a const issue in rpccli_ autogenerated code */
-		guid = *domain_guid;
-		guid_ptr = &guid;
+		state->domain_guid = *domain_guid;
+		guid_ptr = &state->domain_guid;
+	}
+
+	state->domain_name = talloc_strdup(state, domain_name);
+	if (tevent_req_nomem(state->domain_name, req)) {
+		return tevent_req_post(req, ev);
 	}
 
 	subreq = dcerpc_wbint_DsGetDcName_send(
@@ -123,9 +129,12 @@ NTSTATUS wb_dsgetdcname_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
 		req, struct wb_dsgetdcname_state);
 	NTSTATUS status;
 
-	D_INFO("WB command dsgetdcname end.\n");
+	D_INFO("WB command dsgetdcname for %s end.\n",
+	       state->domain_name);
 	if (tevent_req_is_nterror(req, &status)) {
-		D_WARNING("Failed with %s.\n", nt_errstr(status));
+		D_NOTICE("Failed for %s with %s.\n",
+			 state->domain_name,
+			 nt_errstr(status));
 		return status;
 	}
 	*pdcinfo = talloc_move(mem_ctx, &state->dcinfo);
@@ -145,7 +154,7 @@ NTSTATUS wb_dsgetdcname_gencache_set(const char *domname,
 		return NT_STATUS_NO_MEMORY;
 	}
 
-	if (DEBUGLEVEL >= 10) {
+	if (DEBUGLEVEL >= DBGLVL_DEBUG) {
 		NDR_PRINT_DEBUG(netr_DsRGetDCNameInfo, dcinfo);
 	}
 
@@ -237,7 +246,7 @@ NTSTATUS wb_dsgetdcname_gencache_get(TALLOC_CTX *mem_ctx,
 		return state.status;
 	}
 
-	if (DEBUGLEVEL >= 10) {
+	if (DEBUGLEVEL >= DBGLVL_DEBUG) {
 		NDR_PRINT_DEBUG(netr_DsRGetDCNameInfo, state.dcinfo);
 	}
 
diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c
index 36929652708..7cb3e60943b 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -96,7 +96,7 @@ void winbindd_flush_caches(void)
            hang around until the sequence number changes. */
 
 	if (!wcache_invalidate_cache()) {
-		DEBUG(0, ("invalidating the cache failed; revalidate the cache\n"));
+		DBG_ERR("invalidating the cache failed; revalidate the cache\n");
 		if (!winbindd_cache_validate_and_initialize()) {
 			exit(1);
 		}
@@ -238,9 +238,9 @@ static void centry_free(struct cache_entry *centry)
 static bool centry_check_bytes(struct cache_entry *centry, size_t nbytes)
 {
 	if (centry->len - centry->ofs < nbytes) {
-		DEBUG(0,("centry corruption? needed %u bytes, have %d\n",
+		DBG_ERR("centry corruption? needed %u bytes, have %d\n",
 			 (unsigned int)nbytes,
-			 centry->len - centry->ofs));
+			 centry->len - centry->ofs);
 		return false;
 	}
 	return true;
@@ -368,8 +368,8 @@ static char *centry_hash16(struct cache_entry *centry, TALLOC_CTX *mem_ctx)
 	len = centry_uint8(centry);
 
 	if (len != 16) {
-		DEBUG(0,("centry corruption? hash len (%u) != 16\n",
-			len ));
+		DBG_ERR("centry corruption? hash len (%u) != 16\n",
+			len );
 		return NULL;
 	}
 
@@ -427,8 +427,8 @@ static bool wcache_server_down(struct winbindd_domain *domain)
 	ret = (domain->sequence_number == DOM_SEQUENCE_NONE);
 
 	if (ret)
-		DEBUG(10,("wcache_server_down: server for Domain %s down\n",
-			domain->name ));
+		DBG_DEBUG("wcache_server_down: server for Domain %s down\n",
+			domain->name );
 	return ret;
 }
 
@@ -443,8 +443,8 @@ static int wcache_seqnum_parser(TDB_DATA key, TDB_DATA data,
 	struct wcache_seqnum_state *state = private_data;
 
 	if (data.dsize != 8) {
-		DEBUG(10, ("wcache_fetch_seqnum: invalid data size %d\n",
-			   (int)data.dsize));
+		DBG_DEBUG("wcache_fetch_seqnum: invalid data size %d\n",
+			   (int)data.dsize);
 		return -1;
 	}
 
@@ -465,7 +465,7 @@ static bool wcache_fetch_seqnum(const char *domain_name, uint32_t *seqnum,
 	int ret;
 
 	if (wcache->tdb == NULL) {
-		DEBUG(10,("wcache_fetch_seqnum: tdb == NULL\n"));
+		DBG_DEBUG("wcache_fetch_seqnum: tdb == NULL\n");
 		return false;
 	}
 
@@ -490,15 +490,15 @@ static NTSTATUS fetch_cache_seqnum( struct winbindd_domain *domain, time_t now )
 
 	time_diff = now - domain->last_seq_check;
 	if ((int)time_diff > lp_winbind_cache_time()) {
-		DEBUG(10,("fetch_cache_seqnum: timeout [%s][%u @ %u]\n",
+		DBG_DEBUG("fetch_cache_seqnum: timeout [%s][%u @ %u]\n",
 			domain->name, domain->sequence_number,
-			(uint32_t)domain->last_seq_check));
+			(uint32_t)domain->last_seq_check);
 		return NT_STATUS_UNSUCCESSFUL;
 	}
 
-	DEBUG(10,("fetch_cache_seqnum: success [%s][%u @ %u]\n",
+	DBG_DEBUG("fetch_cache_seqnum: success [%s][%u @ %u]\n",
 		domain->name, domain->sequence_number,
-		(uint32_t)domain->last_seq_check));
+		(uint32_t)domain->last_seq_check);
 
 	return NT_STATUS_OK;
 }
@@ -513,7 +513,7 @@ bool wcache_store_seqnum(const char *domain_name, uint32_t seqnum,
 	int ret;
 
 	if (wcache->tdb == NULL) {
-		DEBUG(10, ("wcache_store_seqnum: wcache->tdb == NULL\n"));
+		DBG_DEBUG("wcache_store_seqnum: wcache->tdb == NULL\n");
 		return false;
 	}
 
@@ -525,13 +525,13 @@ bool wcache_store_seqnum(const char *domain_name, uint32_t seqnum,
 	ret = tdb_store(wcache->tdb, key, make_tdb_data(buf, sizeof(buf)),
 			TDB_REPLACE);
 	if (ret != 0) {
-		DEBUG(10, ("tdb_store_bystring failed: %s\n",
-			   tdb_errorstr(wcache->tdb)));
+		DBG_DEBUG("tdb_store_bystring failed: %s\n",
+			   tdb_errorstr(wcache->tdb));
 		return false;
 	}
 
-	DEBUG(10, ("wcache_store_seqnum: success [%s][%u @ %u]\n",
-		   domain_name, seqnum, (unsigned)last_seq_check));
+	DBG_DEBUG("wcache_store_seqnum: success [%s][%u @ %u]\n",
+		   domain_name, seqnum, (unsigned)last_seq_check);
 
 	return true;
 }
@@ -565,7 +565,7 @@ static void refresh_sequence_number(struct winbindd_domain *domain)
 	if ((time_diff < cache_time) &&
 			(domain->sequence_number != DOM_SEQUENCE_NONE) &&
 			NT_STATUS_IS_OK(domain->last_status)) {
-		DEBUG(10, ("refresh_sequence_number: %s time ok\n", domain->name));
+		DBG_DEBUG("refresh_sequence_number: %s time ok\n", domain->name);
 		goto done;
 	}
 
@@ -588,8 +588,8 @@ static void refresh_sequence_number(struct winbindd_domain *domain)
 	store_cache_seqnum( domain );
 
 done:
-	DEBUG(10, ("refresh_sequence_number: %s seq number is now %d\n",
-		   domain->name, domain->sequence_number));
+	DBG_DEBUG("refresh_sequence_number: %s seq number is now %d\n",
+		   domain->name, domain->sequence_number);
 
 	return;
 }
@@ -601,8 +601,8 @@ static bool centry_expired(struct winbindd_domain *domain, const char *keystr, s
 {
 	/* If we've been told to be offline - stay in that state... */
 	if (lp_winbind_offline_logon() && get_global_winbindd_state_offline()) {
-		DEBUG(10,("centry_expired: Key %s for domain %s valid as winbindd is globally offline.\n",
-			keystr, domain->name ));
+		DBG_DEBUG("centry_expired: Key %s for domain %s valid as winbindd is globally offline.\n",
+			keystr, domain->name );
 		return false;
 	}
 
@@ -610,8 +610,8 @@ static bool centry_expired(struct winbindd_domain *domain, const char *keystr, s
 	 * This deals with transient offline states... */
 
 	if (!domain->online) {
-		DEBUG(10,("centry_expired: Key %s for domain %s valid as domain is offline.\n",
-			keystr, domain->name ));
+		DBG_DEBUG("centry_expired: Key %s for domain %s valid as domain is offline.\n",
+			keystr, domain->name );
 		return false;
 	}
 
@@ -619,8 +619,8 @@ static bool centry_expired(struct winbindd_domain *domain, const char *keystr, s
 	   the entry is invalid */
 	if ((domain->sequence_number != DOM_SEQUENCE_NONE) &&
 	    (centry->sequence_number == DOM_SEQUENCE_NONE)) {
-		DEBUG(10,("centry_expired: Key %s for domain %s invalid sequence.\n",
-			keystr, domain->name ));
+		DBG_DEBUG("centry_expired: Key %s for domain %s invalid sequence.\n",
+			keystr, domain->name );
 		return true;
 	}
 
@@ -629,13 +629,13 @@ static bool centry_expired(struct winbindd_domain *domain, const char *keystr, s
 	if (wcache_server_down(domain)
 	    || ((centry->sequence_number == domain->sequence_number)
 		&& ((time_t)centry->timeout > time(NULL)))) {
-		DEBUG(10,("centry_expired: Key %s for domain %s is good.\n",
-			keystr, domain->name ));
+		DBG_DEBUG("centry_expired: Key %s for domain %s is good.\n",
+			keystr, domain->name );
 		return false;
 	}
 
-	DEBUG(10,("centry_expired: Key %s for domain %s expired\n",
-		keystr, domain->name ));
+	DBG_DEBUG("centry_expired: Key %s for domain %s expired\n",
+		keystr, domain->name );
 
 	/* it's expired */
 	return true;
@@ -661,8 +661,8 @@ static struct cache_entry *wcache_fetch_raw(char *kstr)
 
 	if (centry->len < 16) {
 		/* huh? corrupt cache? */
-		DEBUG(10,("wcache_fetch_raw: Corrupt cache for key %s "
-			  "(len < 16)?\n", kstr));
+		DBG_DEBUG("wcache_fetch_raw: Corrupt cache for key %s "
+			  "(len < 16)?\n", kstr);
 		centry_free(centry);
 		return NULL;
 	}
@@ -734,16 +734,16 @@ static struct cache_entry *wcache_fetch(struct winbind_cache *cache,
 
 	if (centry_expired(domain, kstr, centry)) {
 
-		DEBUG(10,("wcache_fetch: entry %s expired for domain %s\n",
-			 kstr, domain->name ));
+		DBG_DEBUG("wcache_fetch: entry %s expired for domain %s\n",
+			 kstr, domain->name );
 
 		centry_free(centry);
 		free(kstr);
 		return NULL;
 	}
 
-	DEBUG(10,("wcache_fetch: returning entry %s for domain %s\n",
-		 kstr, domain->name ));
+	DBG_DEBUG("wcache_fetch: returning entry %s for domain %s\n",
+		 kstr, domain->name );
 
 	free(kstr);
 	return centry;
@@ -782,7 +782,7 @@ static void centry_expand(struct cache_entry *centry, uint32_t len)
 	centry->data = SMB_REALLOC_ARRAY(centry->data, unsigned char,
 					 centry->len);
 	if (!centry->data) {
-		DEBUG(0,("out of memory: needed %d bytes in centry_expand\n", centry->len));
+		DBG_ERR("out of memory: needed %d bytes in centry_expand\n", centry->len);
 		smb_panic_fn("out of memory in centry_expand");
 	}
 }
@@ -843,7 +843,7 @@ static void centry_put_string(struct cache_entry *centry, const char *s)
 	len = strlen(s);
 	/* can't handle more than 254 char strings. Truncating is probably best */
 	if (len > 254) {
-		DEBUG(10,("centry_put_string: truncating len (%d) to: 254\n", len));
+		DBG_DEBUG("centry_put_string: truncating len (%d) to: 254\n", len);
 		len = 254;
 	}
 	centry_put_uint8(centry, len);
@@ -1014,7 +1014,7 @@ static void wcache_save_lockout_policy(struct winbindd_domain *domain,
 
 	centry_end(centry, "LOC_POL/%s", domain->name);
 
-	DEBUG(10,("wcache_save_lockout_policy: %s\n", domain->name));
+	DBG_DEBUG("wcache_save_lockout_policy: %s\n", domain->name);
 
 	centry_free(centry);
 }
@@ -1039,7 +1039,7 @@ static void wcache_save_password_policy(struct winbindd_domain *domain,
 
 	centry_end(centry, "PWD_POL/%s", domain->name);
 
-	DEBUG(10,("wcache_save_password_policy: %s\n", domain->name));
+	DBG_DEBUG("wcache_save_password_policy: %s\n", domain->name);
 
 	centry_free(centry);
 }
@@ -1063,7 +1063,7 @@ static void wcache_save_username_alias(struct winbindd_domain *domain,
 	(void)strupper_m(uname);
 	centry_end(centry, "NSS/NA/%s", uname);
 
-	DEBUG(10,("wcache_save_username_alias: %s -> %s\n", name, alias ));
+	DBG_DEBUG("wcache_save_username_alias: %s -> %s\n", name, alias );
 
 	centry_free(centry);
 }
@@ -1084,7 +1084,7 @@ static void wcache_save_alias_username(struct winbindd_domain *domain,
 	(void)strupper_m(uname);
 	centry_end(centry, "NSS/AN/%s", uname);
 
-	DEBUG(10,("wcache_save_alias_username: %s -> %s\n", alias, name ));
+	DBG_DEBUG("wcache_save_alias_username: %s -> %s\n", alias, name );
 
 	centry_free(centry);
 }
@@ -1130,8 +1130,8 @@ NTSTATUS resolve_username_to_alias( TALLOC_CTX *mem_ctx,
 
 	centry_free(centry);
 
-	DEBUG(10,("resolve_username_to_alias: [Cached] - mapped %s to %s\n",
-		  name, *alias ? *alias : "(none)"));
+	DBG_DEBUG("resolve_username_to_alias: [Cached] - mapped %s to %s\n",
+		  name, *alias ? *alias : "(none)");
 
 	return (*alias) ? NT_STATUS_OK : NT_STATUS_OBJECT_NAME_NOT_FOUND;
 
@@ -1140,8 +1140,8 @@ do_query:
 	/* If its not in cache and we are offline, then fail */
 
 	if (is_domain_offline(domain)) {
-		DEBUG(8,("resolve_username_to_alias: rejecting query "
-			 "in offline mode\n"));
+		DBG_DEBUG("resolve_username_to_alias: rejecting query "
+			 "in offline mode\n");
 		return NT_STATUS_NOT_FOUND;
 	}
 
@@ -1155,8 +1155,8 @@ do_query:
 		wcache_save_username_alias(domain, status, name, "(NULL)");
 	}
 
-	DEBUG(5,("resolve_username_to_alias: backend query returned %s\n",
-		 nt_errstr(status)));
+	DBG_INFO("resolve_username_to_alias: backend query returned %s\n",
+		 nt_errstr(status));
 
 	if ( NT_STATUS_EQUAL(status, NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND) ) {
 		set_domain_offline( domain );
@@ -1210,8 +1210,8 @@ NTSTATUS resolve_alias_to_username( TALLOC_CTX *mem_ctx,
 
 	centry_free(centry);
 
-	DEBUG(10,("resolve_alias_to_username: [Cached] - mapped %s to %s\n",
-		  alias, *name ? *name : "(none)"));
+	DBG_DEBUG("resolve_alias_to_username: [Cached] - mapped %s to %s\n",
+		  alias, *name ? *name : "(none)");
 
 	return (*name) ? NT_STATUS_OK : NT_STATUS_OBJECT_NAME_NOT_FOUND;
 
@@ -1220,16 +1220,16 @@ do_query:
 	/* If its not in cache and we are offline, then fail */
 
 	if (is_domain_offline(domain)) {
-		DEBUG(8,("resolve_alias_to_username: rejecting query "
-			 "in offline mode\n"));
+		DBG_DEBUG("resolve_alias_to_username: rejecting query "
+			 "in offline mode\n");
 		return NT_STATUS_NOT_FOUND;
 	}
 
 	/* an alias cannot contain a domain prefix or '@' */
 
 	if (strchr(alias, '\\') || strchr(alias, '@')) {
-		DEBUG(10,("resolve_alias_to_username: skipping fully "
-			  "qualified name %s\n", alias));
+		DBG_DEBUG("resolve_alias_to_username: skipping fully "
+			  "qualified name %s\n", alias);
 		return NT_STATUS_OBJECT_NAME_INVALID;
 	}
 
@@ -1243,8 +1243,8 @@ do_query:
 		wcache_save_alias_username(domain, status, alias, "(NULL)");
 	}
 
-	DEBUG(5,("resolve_alias_to_username: backend query returned %s\n",
-		 nt_errstr(status)));
+	DBG_INFO("resolve_alias_to_username: backend query returned %s\n",
+		 nt_errstr(status));
 
 	if ( NT_STATUS_EQUAL(status, NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND) ) {
 		set_domain_offline( domain );
@@ -1316,8 +1316,8 @@ NTSTATUS wcache_get_creds(struct winbindd_domain *domain,
 	centry = wcache_fetch(cache, domain, "CRED/%s",
 			      dom_sid_str_buf(sid, &sidstr));
 	if (!centry) {
-		DEBUG(10,("wcache_get_creds: entry for [CRED/%s] not found\n",
-			  dom_sid_str_buf(sid, &sidstr)));
+		DBG_DEBUG("wcache_get_creds: entry for [CRED/%s] not found\n",
+			  dom_sid_str_buf(sid, &sidstr));
 		return NT_STATUS_OBJECT_NAME_NOT_FOUND;
 	}
 
@@ -1340,8 +1340,8 @@ NTSTATUS wcache_get_creds(struct winbindd_domain *domain,
 
 		/* Bad (old) cred cache. Delete and pretend we
 		   don't have it. */
-		DEBUG(0,("wcache_get_creds: bad entry for [CRED/%s] - deleting\n",
-				sidstr.buf));
+		DBG_WARNING("wcache_get_creds: bad entry for [CRED/%s] - deleting\n",
+				sidstr.buf);
 		wcache_delete("CRED/%s", sidstr.buf);
 		centry_free(centry);
 		return NT_STATUS_OBJECT_NAME_NOT_FOUND;
@@ -1361,9 +1361,9 @@ NTSTATUS wcache_get_creds(struct winbindd_domain *domain,
 
 	status = centry->status;
 
-	DEBUG(10,("wcache_get_creds: [Cached] - cached creds for user %s status: %s\n",
+	DBG_DEBUG("wcache_get_creds: [Cached] - cached creds for user %s status: %s\n",
 		  dom_sid_str_buf(sid, &sidstr),
-		  nt_errstr(status) ));
+		  nt_errstr(status) );
 
 	centry_free(centry);
 	return status;
@@ -1427,7 +1427,7 @@ NTSTATUS wcache_save_creds(struct winbindd_domain *domain,
 	centry_put_hash16(centry, cred_salt);
 	centry_end(centry, "CRED/%s", dom_sid_str_buf(sid, &sid_str));
 
-	DEBUG(10,("wcache_save_creds: %s\n", sid_str.buf));
+	DBG_DEBUG("wcache_save_creds: %s\n", sid_str.buf);
 
 	centry_free(centry);
 
@@ -1477,8 +1477,8 @@ do_fetch_cache:
 do_cached:
 	status = centry->status;
 
-	DEBUG(10,("query_user_list: [Cached] - cached list for domain %s status: %s\n",
-		domain->name, nt_errstr(status) ));
+	DBG_DEBUG("query_user_list: [Cached] - cached list for domain %s status: %s\n",
+		domain->name, nt_errstr(status) );
 
 	centry_free(centry);
 	return status;
@@ -1496,8 +1496,8 @@ do_query:
 	retry = 0;
 	do {
 
-		DEBUG(10,("query_user_list: [Cached] - doing backend query for list for domain %s\n",
-			domain->name ));
+		DBG_DEBUG("query_user_list: [Cached] - doing backend query for list for domain %s\n",
+			domain->name );
 
 		rids = NULL;
 		status = domain->backend->query_user_list(domain, mem_ctx,
@@ -1505,12 +1505,12 @@ do_query:
 		num_rids = talloc_array_length(rids);
 
 		if (!NT_STATUS_IS_OK(status)) {
-			DEBUG(3, ("query_user_list: returned 0x%08x, "
-				  "retrying\n", NT_STATUS_V(status)));
+			DBG_NOTICE("query_user_list: returned 0x%08x, "


-- 
Samba Shared Repository



More information about the samba-cvs mailing list