From 900288a2b86abd247f9eb4cd15dc5617a17cfef1 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 15 Dec 2007 21:11:36 +0100 Subject: Replace sid_string_static by sid_string_dbg in DEBUGs (This used to be commit bb35e794ec129805e874ceba882bcc1e84791a09) --- source3/passdb/lookup_sid.c | 67 +++++++++++++++++++++-------------------- source3/passdb/passdb.c | 5 ++- source3/passdb/pdb_compat.c | 4 +-- source3/passdb/pdb_get_set.c | 4 +-- source3/passdb/pdb_interface.c | 8 ++--- source3/passdb/pdb_ldap.c | 57 +++++++++++++++++------------------ source3/passdb/pdb_smbpasswd.c | 11 ++++--- source3/passdb/secrets.c | 2 +- source3/passdb/util_wellknown.c | 6 ++-- 9 files changed, 80 insertions(+), 84 deletions(-) (limited to 'source3/passdb') diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c index bb54959e96..3096fde1ab 100644 --- a/source3/passdb/lookup_sid.c +++ b/source3/passdb/lookup_sid.c @@ -658,7 +658,7 @@ static bool check_dom_sid_to_level(const DOM_SID *sid, int level) DEBUG(10, ("%s SID %s in level %d\n", ret ? "Accepting" : "Rejecting", - sid_string_static(sid), level)); + sid_string_dbg(sid), level)); return ret; } @@ -935,12 +935,10 @@ bool lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid, done: if (ret) { - DEBUG(10, ("Sid %s -> %s\\%s(%d)\n", - sid_string_static(sid), domain->name, - name->name, name->type)); + DEBUG(10, ("Sid %s -> %s\\%s(%d)\n", sid_string_dbg(sid), + domain->name, name->name, name->type)); } else { - DEBUG(10, ("failed to lookup sid %s\n", - sid_string_static(sid))); + DEBUG(10, ("failed to lookup sid %s\n", sid_string_dbg(sid))); } TALLOC_FREE(tmp_ctx); return ret; @@ -988,7 +986,7 @@ static bool fetch_sid_from_uid_cache(DOM_SID *psid, uid_t uid) if (pc->uid == uid) { *psid = pc->sid; DEBUG(3,("fetch sid from uid cache %u -> %s\n", - (unsigned int)uid, sid_string_static(psid))); + (unsigned int)uid, sid_string_dbg(psid))); DLIST_PROMOTE(uid_sid_cache_head, pc); return true; } @@ -1008,7 +1006,7 @@ static bool fetch_uid_from_cache( uid_t *puid, const DOM_SID *psid ) if (sid_compare(&pc->sid, psid) == 0) { *puid = pc->uid; DEBUG(3,("fetch uid from cache %u -> %s\n", - (unsigned int)*puid, sid_string_static(psid))); + (unsigned int)*puid, sid_string_dbg(psid))); DLIST_PROMOTE(uid_sid_cache_head, pc); return true; } @@ -1065,7 +1063,7 @@ static bool fetch_sid_from_gid_cache(DOM_SID *psid, gid_t gid) if (pc->gid == gid) { *psid = pc->sid; DEBUG(3,("fetch sid from gid cache %u -> %s\n", - (unsigned int)gid, sid_string_static(psid))); + (unsigned int)gid, sid_string_dbg(psid))); DLIST_PROMOTE(gid_sid_cache_head, pc); return true; } @@ -1085,7 +1083,7 @@ static bool fetch_gid_from_cache(gid_t *pgid, const DOM_SID *psid) if (sid_compare(&pc->sid, psid) == 0) { *pgid = pc->gid; DEBUG(3,("fetch gid from cache %u -> %s\n", - (unsigned int)*pgid, sid_string_static(psid))); + (unsigned int)*pgid, sid_string_dbg(psid))); DLIST_PROMOTE(gid_sid_cache_head, pc); return true; } @@ -1128,8 +1126,8 @@ void store_gid_sid_cache(const DOM_SID *psid, gid_t gid) sid_copy(&pc->sid, psid); DLIST_ADD(gid_sid_cache_head, pc); - DEBUG(3,("store_gid_sid_cache: gid %u in cache -> %s\n", (unsigned int)gid, - sid_string_static(psid))); + DEBUG(3,("store_gid_sid_cache: gid %u in cache -> %s\n", + (unsigned int)gid, sid_string_dbg(psid))); n_gid_sid_cache++; } @@ -1162,7 +1160,7 @@ static void legacy_uid_to_sid(DOM_SID *psid, uid_t uid) done: DEBUG(10,("LEGACY: uid %u -> sid %s\n", (unsigned int)uid, - sid_string_static(psid))); + sid_string_dbg(psid))); store_uid_sid_cache(psid, uid); return; @@ -1193,7 +1191,7 @@ static void legacy_gid_to_sid(DOM_SID *psid, gid_t gid) done: DEBUG(10,("LEGACY: gid %u -> sid %s\n", (unsigned int)gid, - sid_string_static(psid))); + sid_string_dbg(psid))); store_gid_sid_cache(psid, gid); return; @@ -1219,7 +1217,7 @@ static bool legacy_sid_to_uid(const DOM_SID *psid, uid_t *puid) if (ret) { if (type != SID_NAME_USER) { DEBUG(5, ("sid %s is a %s, expected a user\n", - sid_string_static(psid), + sid_string_dbg(psid), sid_type_lookup(type))); return false; } @@ -1230,12 +1228,13 @@ static bool legacy_sid_to_uid(const DOM_SID *psid, uid_t *puid) /* This was ours, but it was not mapped. Fail */ } - DEBUG(10,("LEGACY: mapping failed for sid %s\n", sid_string_static(psid))); + DEBUG(10,("LEGACY: mapping failed for sid %s\n", + sid_string_dbg(psid))); return false; done: - DEBUG(10,("LEGACY: sid %s -> uid %u\n", sid_string_static(psid), - (unsigned int)*puid )); + DEBUG(10,("LEGACY: sid %s -> uid %u\n", sid_string_dbg(psid), + (unsigned int)*puid )); store_uid_sid_cache(psid, *puid); return true; @@ -1265,7 +1264,8 @@ static bool legacy_sid_to_gid(const DOM_SID *psid, gid_t *pgid) *pgid = map.gid; goto done; } - DEBUG(10,("LEGACY: mapping failed for sid %s\n", sid_string_static(psid))); + DEBUG(10,("LEGACY: mapping failed for sid %s\n", + sid_string_dbg(psid))); return false; } @@ -1279,8 +1279,8 @@ static bool legacy_sid_to_gid(const DOM_SID *psid, gid_t *pgid) if (ret) { if ((type != SID_NAME_DOM_GRP) && (type != SID_NAME_ALIAS)) { - DEBUG(5, ("LEGACY: sid %s is a %s, expected a group\n", - sid_string_static(psid), + DEBUG(5, ("LEGACY: sid %s is a %s, expected " + "a group\n", sid_string_dbg(psid), sid_type_lookup(type))); return false; } @@ -1291,11 +1291,12 @@ static bool legacy_sid_to_gid(const DOM_SID *psid, gid_t *pgid) /* This was ours, but it was not mapped. Fail */ } - DEBUG(10,("LEGACY: mapping failed for sid %s\n", sid_string_static(psid))); + DEBUG(10,("LEGACY: mapping failed for sid %s\n", + sid_string_dbg(psid))); return false; done: - DEBUG(10,("LEGACY: sid %s -> gid %u\n", sid_string_static(psid), + DEBUG(10,("LEGACY: sid %s -> gid %u\n", sid_string_dbg(psid), (unsigned int)*pgid )); store_gid_sid_cache(psid, *pgid); @@ -1325,8 +1326,8 @@ void uid_to_sid(DOM_SID *psid, uid_t uid) return; } - DEBUG(10,("uid %u -> sid %s\n", - (unsigned int)uid, sid_string_static(psid))); + DEBUG(10,("uid %u -> sid %s\n", (unsigned int)uid, + sid_string_dbg(psid))); store_uid_sid_cache(psid, uid); return; @@ -1354,8 +1355,8 @@ void gid_to_sid(DOM_SID *psid, gid_t gid) return; } - DEBUG(10,("gid %u -> sid %s\n", - (unsigned int)gid, sid_string_static(psid))); + DEBUG(10,("gid %u -> sid %s\n", (unsigned int)gid, + sid_string_dbg(psid))); store_gid_sid_cache(psid, gid); return; @@ -1384,7 +1385,7 @@ bool sid_to_uid(const DOM_SID *psid, uid_t *puid) *puid = uid; /* return here, don't cache */ - DEBUG(10,("sid %s -> uid %u\n", sid_string_static(psid), + DEBUG(10,("sid %s -> uid %u\n", sid_string_dbg(psid), (unsigned int)*puid )); return true; } @@ -1395,14 +1396,14 @@ bool sid_to_uid(const DOM_SID *psid, uid_t *puid) } DEBUG(5, ("winbind failed to find a uid for sid %s\n", - sid_string_static(psid))); + sid_string_dbg(psid))); return false; } /* TODO: Here would be the place to allocate both a gid and a uid for * the SID in question */ - DEBUG(10,("sid %s -> uid %u\n", sid_string_static(psid), + DEBUG(10,("sid %s -> uid %u\n", sid_string_dbg(psid), (unsigned int)*puid )); store_uid_sid_cache(psid, *puid); @@ -1432,7 +1433,7 @@ bool sid_to_gid(const DOM_SID *psid, gid_t *pgid) *pgid = gid; /* return here, don't cache */ - DEBUG(10,("sid %s -> gid %u\n", sid_string_static(psid), + DEBUG(10,("sid %s -> gid %u\n", sid_string_dbg(psid), (unsigned int)*pgid )); return true; } @@ -1446,11 +1447,11 @@ bool sid_to_gid(const DOM_SID *psid, gid_t *pgid) } DEBUG(10,("winbind failed to find a gid for sid %s\n", - sid_string_static(psid))); + sid_string_dbg(psid))); return false; } - DEBUG(10,("sid %s -> gid %u\n", sid_string_static(psid), + DEBUG(10,("sid %s -> gid %u\n", sid_string_dbg(psid), (unsigned int)*pgid )); store_gid_sid_cache(psid, *pgid); diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index c4248bb48e..9311b8a74e 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -595,7 +595,7 @@ bool lookup_global_sam_name(const char *name, int flags, uint32_t *rid, if (ret) { if (!sid_check_is_in_our_domain(&user_sid)) { DEBUG(0, ("User %s with invalid SID %s in passdb\n", - name, sid_string_static(&user_sid))); + name, sid_string_dbg(&user_sid))); return False; } @@ -620,8 +620,7 @@ bool lookup_global_sam_name(const char *name, int flags, uint32_t *rid, /* BUILTIN groups are looked up elsewhere */ if (!sid_check_is_in_our_domain(&map.sid)) { DEBUG(10, ("Found group %s (%s) not in our domain -- " - "ignoring.", name, - sid_string_static(&map.sid))); + "ignoring.", name, sid_string_dbg(&map.sid))); return False; } diff --git a/source3/passdb/pdb_compat.c b/source3/passdb/pdb_compat.c index 10fc170476..9967eb53ad 100644 --- a/source3/passdb/pdb_compat.c +++ b/source3/passdb/pdb_compat.c @@ -69,7 +69,7 @@ bool pdb_set_user_sid_from_rid (struct samu *sampass, uint32 rid, enum pdb_value return False; DEBUG(10, ("pdb_set_user_sid_from_rid:\n\tsetting user sid %s from rid %d\n", - sid_string_static(&u_sid),rid)); + sid_string_dbg(&u_sid),rid)); return True; } @@ -96,7 +96,7 @@ bool pdb_set_group_sid_from_rid (struct samu *sampass, uint32 grid, enum pdb_val return False; DEBUG(10, ("pdb_set_group_sid_from_rid:\n\tsetting group sid %s from rid %d\n", - sid_string_static(&g_sid), grid)); + sid_string_dbg(&g_sid), grid)); return True; } diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c index e8bea19152..3b55dd478f 100644 --- a/source3/passdb/pdb_get_set.c +++ b/source3/passdb/pdb_get_set.c @@ -506,7 +506,7 @@ bool pdb_set_user_sid(struct samu *sampass, const DOM_SID *u_sid, enum pdb_value sid_copy(&sampass->user_sid, u_sid); DEBUG(10, ("pdb_set_user_sid: setting user sid %s\n", - sid_string_static(&sampass->user_sid))); + sid_string_dbg(&sampass->user_sid))); return pdb_set_init_flags(sampass, PDB_USERSID, flag); } @@ -564,7 +564,7 @@ bool pdb_set_group_sid(struct samu *sampass, const DOM_SID *g_sid, enum pdb_valu } DEBUG(10, ("pdb_set_group_sid: setting group sid %s\n", - sid_string_static(sampass->group_sid))); + sid_string_dbg(sampass->group_sid))); return pdb_set_init_flags(sampass, PDB_GROUPSID, flag); } diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c index 0159932e34..d455b7636c 100644 --- a/source3/passdb/pdb_interface.c +++ b/source3/passdb/pdb_interface.c @@ -1265,7 +1265,7 @@ static bool pdb_default_uid_to_rid(struct pdb_methods *methods, uid_t uid, if (!ret) { DEBUG(1, ("Could not peek rid out of sid %s\n", - sid_string_static(&sid))); + sid_string_dbg(&sid))); } return ret; @@ -1332,13 +1332,13 @@ static bool pdb_default_sid_to_id(struct pdb_methods *methods, GROUP_MAP map; if (!NT_STATUS_IS_OK(methods->getgrsid(methods, &map, *sid))) { DEBUG(10, ("Could not find map for sid %s\n", - sid_string_static(sid))); + sid_string_dbg(sid))); goto done; } if ((map.sid_name_use != SID_NAME_ALIAS) && (map.sid_name_use != SID_NAME_WKN_GRP)) { DEBUG(10, ("Map for sid %s is a %s, expected an " - "alias\n", sid_string_static(sid), + "alias\n", sid_string_dbg(sid), sid_type_lookup(map.sid_name_use))); goto done; } @@ -1350,7 +1350,7 @@ static bool pdb_default_sid_to_id(struct pdb_methods *methods, } DEBUG(5, ("Sid %s is neither ours, a Unix SID, nor builtin\n", - sid_string_static(sid))); + sid_string_dbg(sid))); done: diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 750b71fb1c..bb983a6086 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -1135,8 +1135,9 @@ static bool init_ldap_from_sam (struct ldapsam_privates *ldap_state, case SCHEMAVER_SAMBAACCOUNT: if (!sid_peek_check_rid(&ldap_state->domain_sid, user_sid, &rid)) { DEBUG(1, ("init_ldap_from_sam: User's SID (%s) is not for this domain (%s), cannot add to LDAP!\n", - sid_string_static(user_sid), - sid_string_static(&ldap_state->domain_sid))); + sid_string_dbg(user_sid), + sid_string_dbg( + &ldap_state->domain_sid))); return False; } if (asprintf(&temp, "%i", rid) < 0) { @@ -1171,8 +1172,9 @@ static bool init_ldap_from_sam (struct ldapsam_privates *ldap_state, case SCHEMAVER_SAMBAACCOUNT: if (!sid_peek_check_rid(&ldap_state->domain_sid, group_sid, &rid)) { DEBUG(1, ("init_ldap_from_sam: User's Primary Group SID (%s) is not for this domain (%s), cannot add to LDAP!\n", - sid_string_static(group_sid), - sid_string_static(&ldap_state->domain_sid))); + sid_string_dbg(group_sid), + sid_string_dbg( + &ldap_state->domain_sid))); return False; } @@ -1696,7 +1698,6 @@ static NTSTATUS ldapsam_getsampwsid(struct pdb_methods *my_methods, struct samu LDAPMessage *entry = NULL; int count; int rc; - fstring sid_string; rc = ldapsam_get_ldap_user_by_sid(ldap_state, sid, &result); @@ -1706,13 +1707,14 @@ static NTSTATUS ldapsam_getsampwsid(struct pdb_methods *my_methods, struct samu count = ldap_count_entries(ldap_state->smbldap_state->ldap_struct, result); if (count < 1) { - DEBUG(4, ("ldapsam_getsampwsid: Unable to locate SID [%s] count=%d\n", sid_to_string(sid_string, sid), - count)); + DEBUG(4, ("ldapsam_getsampwsid: Unable to locate SID [%s] " + "count=%d\n", sid_string_dbg(sid), count)); ldap_msgfree(result); return NT_STATUS_NO_SUCH_USER; } else if (count > 1) { - DEBUG(1, ("ldapsam_getsampwsid: More than one user with SID [%s]. Failing. count=%d\n", sid_to_string(sid_string, sid), - count)); + DEBUG(1, ("ldapsam_getsampwsid: More than one user with SID " + "[%s]. Failing. count=%d\n", sid_string_dbg(sid), + count)); ldap_msgfree(result); return NT_STATUS_NO_SUCH_USER; } @@ -2148,7 +2150,6 @@ static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, struct s const DOM_SID *sid = pdb_get_user_sid(newpwd); char *filter = NULL; char *dn = NULL; - fstring sid_string; NTSTATUS status = NT_STATUS_UNSUCCESSFUL; TALLOC_CTX *ctx = talloc_init("ldapsam_add_sam_account"); @@ -2184,8 +2185,9 @@ static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, struct s sid, &result); if (rc == LDAP_SUCCESS) { if (ldap_count_entries(ldap_state->smbldap_state->ldap_struct, result) != 0) { - DEBUG(0,("ldapsam_add_sam_account: SID '%s' already in the base, with samba attributes\n", - sid_to_string(sid_string, sid))); + DEBUG(0,("ldapsam_add_sam_account: SID '%s' " + "already in the base, with samba " + "attributes\n", sid_string_dbg(sid))); goto fn_exit; } ldap_msgfree(result); @@ -2659,7 +2661,7 @@ static bool ldapsam_extract_rid_from_entry(LDAP *ldap_struct, if (sid_compare_domain(&sid, domain_sid) != 0) { DEBUG(10, ("SID %s is not in expected domain %s\n", - str, sid_string_static(domain_sid))); + str, sid_string_dbg(domain_sid))); return False; } @@ -2719,7 +2721,7 @@ static NTSTATUS ldapsam_enum_group_members(struct pdb_methods *methods, if (count > 1) { DEBUG(1, ("Found more than one groupmap entry for %s\n", - sid_string_static(group))); + sid_string_dbg(group))); ret = NT_STATUS_INTERNAL_DB_CORRUPTION; goto done; } @@ -3138,8 +3140,7 @@ static NTSTATUS ldapsam_add_group_mapping_entry(struct pdb_methods *methods, (ldap_count_entries(ldap_state->smbldap_state->ldap_struct, msg) > 0)) { DEBUG(3, ("SID %s already present in LDAP, refusing to add " - "group mapping entry\n", - sid_string_static(&map->sid))); + "group mapping entry\n", sid_string_dbg(&map->sid))); result = NT_STATUS_GROUP_EXISTS; goto done; } @@ -3158,7 +3159,7 @@ static NTSTATUS ldapsam_add_group_mapping_entry(struct pdb_methods *methods, && !sid_check_is_in_builtin(&map->sid) ) { DEBUG(3, ("Refusing to map sid %s as an alias, not in our domain\n", - sid_string_static(&map->sid))); + sid_string_dbg(&map->sid))); result = NT_STATUS_INVALID_PARAMETER; goto done; } @@ -3182,7 +3183,7 @@ static NTSTATUS ldapsam_add_group_mapping_entry(struct pdb_methods *methods, if (pdb_gid_to_sid(map->gid, &sid)) { DEBUG(3, ("Gid %d is already mapped to SID %s, refusing to " - "add\n", map->gid, sid_string_static(&sid))); + "add\n", map->gid, sid_string_dbg(&sid))); result = NT_STATUS_GROUP_EXISTS; goto done; } @@ -3557,7 +3558,7 @@ static NTSTATUS ldapsam_modify_aliasmem(struct pdb_methods *methods, if (type == SID_NAME_USE_NONE) { DEBUG(5, ("SID %s is neither in builtin nor in our domain!\n", - sid_string_static(alias))); + sid_string_dbg(alias))); return NT_STATUS_NO_SUCH_ALIAS; } @@ -3678,7 +3679,7 @@ static NTSTATUS ldapsam_enum_aliasmem(struct pdb_methods *methods, if (type == SID_NAME_USE_NONE) { DEBUG(5, ("SID %s is neither in builtin nor in our domain!\n", - sid_string_static(alias))); + sid_string_dbg(alias))); return NT_STATUS_NO_SUCH_ALIAS; } @@ -3786,7 +3787,7 @@ static NTSTATUS ldapsam_alias_memberships(struct pdb_methods *methods, if (type == SID_NAME_USE_NONE) { DEBUG(5, ("SID %s is neither builtin nor domain!\n", - sid_string_static(domain_sid))); + sid_string_dbg(domain_sid))); return NT_STATUS_UNSUCCESSFUL; } @@ -4548,7 +4549,7 @@ static bool ldapuser2displayentry(struct ldap_search_state *state, if (!sid_peek_check_rid(get_global_sam_sid(), &sid, &result->rid)) { DEBUG(0, ("sid %s does not belong to our domain\n", - sid_string_static(&sid))); + sid_string_dbg(&sid))); return False; } @@ -4701,7 +4702,7 @@ static bool ldapgroup2displayentry(struct ldap_search_state *state, && !sid_peek_check_rid(&global_sid_Builtin, &sid, &result->rid)) { DEBUG(0, ("%s is not in our domain\n", - sid_string_static(&sid))); + sid_string_dbg(&sid))); return False; } break; @@ -6367,21 +6368,17 @@ NTSTATUS pdb_init_ldapsam(struct pdb_methods **pdb_method, const char *location) &secrets_domain_sid); if (!found_sid || !sid_equal(&secrets_domain_sid, &ldap_domain_sid)) { - fstring new_sid_str, old_sid_str; DEBUG(1, ("pdb_init_ldapsam: Resetting SID for domain " "%s based on pdb_ldap results %s -> %s\n", ldap_state->domain_name, - sid_to_string(old_sid_str, - &secrets_domain_sid), - sid_to_string(new_sid_str, - &ldap_domain_sid))); + sid_string_dbg(&secrets_domain_sid), + sid_string_dbg(&ldap_domain_sid))); /* reset secrets.tdb sid */ secrets_store_domain_sid(ldap_state->domain_name, &ldap_domain_sid); DEBUG(1, ("New global sam SID: %s\n", - sid_to_string(new_sid_str, - get_global_sam_sid()))); + sid_string_dbg(get_global_sam_sid()))); } sid_copy(&ldap_state->domain_sid, &ldap_domain_sid); TALLOC_FREE(domain_sid_string); diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c index 139aa14155..6a3bdb80a2 100644 --- a/source3/passdb/pdb_smbpasswd.c +++ b/source3/passdb/pdb_smbpasswd.c @@ -1394,10 +1394,10 @@ static NTSTATUS smbpasswd_getsampwsid(struct pdb_methods *my_methods, struct sam struct smbpasswd_privates *smbpasswd_state = (struct smbpasswd_privates*)my_methods->private_data; struct smb_passwd *smb_pw; FILE *fp = NULL; - fstring sid_str; uint32 rid; - DEBUG(10, ("smbpasswd_getsampwrid: search by sid: %s\n", sid_to_string(sid_str, sid))); + DEBUG(10, ("smbpasswd_getsampwrid: search by sid: %s\n", + sid_string_dbg(sid))); if (!sid_peek_check_rid(get_global_sam_sid(), sid, &rid)) return NT_STATUS_UNSUCCESSFUL; @@ -1443,9 +1443,10 @@ static NTSTATUS smbpasswd_getsampwsid(struct pdb_methods *my_methods, struct sam /* build_sam_account might change the SID on us, if the name was for the guest account */ if (NT_STATUS_IS_OK(nt_status) && !sid_equal(pdb_get_user_sid(sam_acct), sid)) { - fstring sid_string1, sid_string2; - DEBUG(1, ("looking for user with sid %s instead returned %s for account %s!?!\n", - sid_to_string(sid_string1, sid), sid_to_string(sid_string2, pdb_get_user_sid(sam_acct)), pdb_get_username(sam_acct))); + DEBUG(1, ("looking for user with sid %s instead returned %s " + "for account %s!?!\n", sid_string_dbg(sid), + sid_string_dbg(pdb_get_user_sid(sam_acct)), + pdb_get_username(sam_acct))); return NT_STATUS_NO_SUCH_USER; } diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c index fde7fc0968..0ea3887378 100644 --- a/source3/passdb/secrets.c +++ b/source3/passdb/secrets.c @@ -891,7 +891,7 @@ NTSTATUS secrets_trusted_domains(TALLOC_CTX *mem_ctx, uint32 *num_domains, if (pass.domain_sid.num_auths != 4) { DEBUG(0, ("SID %s is not a domain sid, has %d " "auths instead of 4\n", - sid_string_static(&pass.domain_sid), + sid_string_dbg(&pass.domain_sid), pass.domain_sid.num_auths)); continue; } diff --git a/source3/passdb/util_wellknown.c b/source3/passdb/util_wellknown.c index 3ac8c1453c..3a30ab0a65 100644 --- a/source3/passdb/util_wellknown.c +++ b/source3/passdb/util_wellknown.c @@ -123,8 +123,7 @@ bool lookup_wellknown_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid, } if (users == NULL) { - DEBUG(10, ("SID %s is no special sid\n", - sid_string_static(sid))); + DEBUG(10, ("SID %s is no special sid\n", sid_string_dbg(sid))); return False; } @@ -135,8 +134,7 @@ bool lookup_wellknown_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid, } } - DEBUG(10, ("RID of special SID %s not found\n", - sid_string_static(sid))); + DEBUG(10, ("RID of special SID %s not found\n", sid_string_dbg(sid))); return False; } -- cgit