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/smbd/lanman.c | 2 +- source3/smbd/ntquotas.c | 9 +++++---- source3/smbd/nttrans.c | 7 ++++--- source3/smbd/posix_acls.c | 18 ++++++++---------- source3/smbd/service.c | 4 ++-- 5 files changed, 20 insertions(+), 20 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index 7df7de36dc..3ab216c062 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -2221,7 +2221,7 @@ static bool api_NetUserGetGroups(connection_struct *conn,uint16 vuid, if ( !pdb_getsampwsid(sampw, &user_sid) ) { DEBUG(10, ("pdb_getsampwsid(%s) failed for user %s\n", - sid_string_static(&user_sid), UserName)); + sid_string_dbg(&user_sid), UserName)); goto done; } diff --git a/source3/smbd/ntquotas.c b/source3/smbd/ntquotas.c index 96ca2bc656..fcccf9d9fc 100644 --- a/source3/smbd/ntquotas.c +++ b/source3/smbd/ntquotas.c @@ -88,7 +88,7 @@ int vfs_get_ntquota(files_struct *fsp, enum SMB_QUOTA_TYPE qtype, DOM_SID *psid, if (psid && !sid_to_uid(psid, &id.uid)) { DEBUG(0,("sid_to_uid: failed, SID[%s]\n", - sid_string_static(psid))); + sid_string_dbg(psid))); } ret = SMB_VFS_GET_QUOTA(fsp->conn, qtype, id, &D); @@ -132,7 +132,7 @@ int vfs_set_ntquota(files_struct *fsp, enum SMB_QUOTA_TYPE qtype, DOM_SID *psid, if (psid && !sid_to_uid(psid, &id.uid)) { DEBUG(0,("sid_to_uid: failed, SID[%s]\n", - sid_string_static(psid))); + sid_string_dbg(psid))); } ret = SMB_VFS_SET_QUOTA(fsp->conn, qtype, id, &D); @@ -188,12 +188,13 @@ int vfs_get_user_ntquota_list(files_struct *fsp, SMB_NTQUOTA_LIST **qt_list) if (vfs_get_ntquota(fsp, SMB_USER_QUOTA_TYPE, &sid, &tmp_qt)!=0) { DEBUG(5,("no quota entry for sid[%s] path[%s]\n", - sid_string_static(&sid),fsp->conn->connectpath)); + sid_string_dbg(&sid), + fsp->conn->connectpath)); continue; } DEBUG(15,("quota entry for id[%s] path[%s]\n", - sid_string_static(&sid),fsp->conn->connectpath)); + sid_string_dbg(&sid), fsp->conn->connectpath)); if ((tmp_list_ent=TALLOC_ZERO_P(mem_ctx,SMB_NTQUOTA_LIST))==NULL) { DEBUG(0,("TALLOC_ZERO() failed\n")); diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 99b2bf65bb..641670c484 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -2033,11 +2033,12 @@ static void call_nt_transact_ioctl(connection_struct *conn, /*unknown = IVAL(pdata,0);*/ sid_parse(pdata+4,sid_len,&sid); - DEBUGADD(10,("for SID: %s\n",sid_string_static(&sid))); + DEBUGADD(10, ("for SID: %s\n", sid_string_dbg(&sid))); if (!sid_to_uid(&sid, &uid)) { DEBUG(0,("sid_to_uid: failed, sid[%s] sid_len[%lu]\n", - sid_string_static(&sid),(unsigned long)sid_len)); + sid_string_dbg(&sid), + (unsigned long)sid_len)); uid = (-1); } @@ -2466,7 +2467,7 @@ static void call_nt_transact_set_user_quota(connection_struct *conn, #endif /* LARGE_SMB_OFF_T */ sid_parse(pdata+40,sid_len,&sid); - DEBUGADD(8,("SID: %s\n",sid_string_static(&sid))); + DEBUGADD(8,("SID: %s\n", sid_string_dbg(&sid))); /* 44 unknown bytes left... */ diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index 27953a2051..ccfed69721 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -546,10 +546,8 @@ static canon_ace *dup_canon_ace( canon_ace *src_ace) static void print_canon_ace(canon_ace *pace, int num) { - fstring str; - dbgtext( "canon_ace index %d. Type = %s ", num, pace->attr == ALLOW_ACE ? "allow" : "deny" ); - dbgtext( "SID = %s ", sid_to_string( str, &pace->trustee)); + dbgtext( "SID = %s ", sid_string_dbg(&pace->trustee)); if (pace->owner_type == UID_ACE) { const char *u_name = uidtoname(pace->unix_ug.uid); dbgtext( "uid %u (%s) ", (unsigned int)pace->unix_ug.uid, u_name ); @@ -962,7 +960,7 @@ NTSTATUS unpack_nt_owners(int snum, uid_t *puser, gid_t *pgrp, uint32 security_i } else { DEBUG(3,("unpack_nt_owners: unable to validate" " owner sid for %s\n", - sid_string_static(&owner_sid))); + sid_string_dbg(&owner_sid))); return NT_STATUS_INVALID_OWNER; } } @@ -1414,23 +1412,23 @@ static bool create_canon_ace_lists(files_struct *fsp, SMB_STRUCT_STAT *pst, current_ace->owner_type = GID_ACE; current_ace->type = SMB_ACL_GROUP; } else { - fstring str; - /* * Silently ignore map failures in non-mappable SIDs (NT Authority, BUILTIN etc). */ if (non_mappable_sid(&psa->trustee)) { - DEBUG(10,("create_canon_ace_lists: ignoring non-mappable SID %s\n", - sid_to_string(str, &psa->trustee) )); + DEBUG(10, ("create_canon_ace_lists: ignoring " + "non-mappable SID %s\n", + sid_string_dbg(&psa->trustee))); SAFE_FREE(current_ace); continue; } free_canon_ace_list(file_ace); free_canon_ace_list(dir_ace); - DEBUG(0,("create_canon_ace_lists: unable to map SID %s to uid or gid.\n", - sid_to_string(str, ¤t_ace->trustee) )); + DEBUG(0, ("create_canon_ace_lists: unable to map SID " + "%s to uid or gid.\n", + sid_string_dbg(¤t_ace->trustee))); SAFE_FREE(current_ace); return False; } diff --git a/source3/smbd/service.c b/source3/smbd/service.c index e98ce0f8c2..88ab9f0048 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -597,7 +597,7 @@ static NTSTATUS find_forced_group(bool force_user, if (!sid_to_gid(&group_sid, &gid)) { DEBUG(10, ("sid_to_gid(%s) for %s failed\n", - sid_string_static(&group_sid), groupname)); + sid_string_dbg(&group_sid), groupname)); goto done; } @@ -885,7 +885,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, if (!sid_to_gid(sid, &gid)) { DEBUG(10, ("Could not convert SID %s to gid, " "ignoring it\n", - sid_string_static(sid))); + sid_string_dbg(sid))); continue; } if (!add_gid_to_array_unique(conn->mem_ctx, gid, &conn->groups, -- cgit