summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2007-12-15 21:11:36 +0100
committerVolker Lendecke <vl@samba.org>2007-12-15 22:09:36 +0100
commit900288a2b86abd247f9eb4cd15dc5617a17cfef1 (patch)
tree4d8f4d5ec29c831932088db74773f9e338e86824 /source3/lib
parentf498f661bcd6f2d97d55aa275dcd1eb2cbcda8a4 (diff)
downloadsamba-900288a2b86abd247f9eb4cd15dc5617a17cfef1.tar.gz
samba-900288a2b86abd247f9eb4cd15dc5617a17cfef1.tar.bz2
samba-900288a2b86abd247f9eb4cd15dc5617a17cfef1.zip
Replace sid_string_static by sid_string_dbg in DEBUGs
(This used to be commit bb35e794ec129805e874ceba882bcc1e84791a09)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/afs.c2
-rw-r--r--source3/lib/privileges.c12
-rw-r--r--source3/lib/secdesc.c25
-rw-r--r--source3/lib/util_seaccess.c25
-rw-r--r--source3/lib/util_sid.c2
5 files changed, 30 insertions, 36 deletions
diff --git a/source3/lib/afs.c b/source3/lib/afs.c
index a815c21907..a7d6f6c9f7 100644
--- a/source3/lib/afs.c
+++ b/source3/lib/afs.c
@@ -242,7 +242,7 @@ bool afs_login(connection_struct *conn)
afs_username = talloc_string_sub(talloc_tos(),
afs_username,
"%s",
- sid_string_static(user_sid));
+ sid_string_tos(user_sid));
if (!afs_username) {
return false;
}
diff --git a/source3/lib/privileges.c b/source3/lib/privileges.c
index 839ce91a57..3e2c756849 100644
--- a/source3/lib/privileges.c
+++ b/source3/lib/privileges.c
@@ -59,8 +59,8 @@ static bool get_privileges( const DOM_SID *sid, SE_PRIV *mask )
data = tdb_fetch_bystring( tdb, keystr );
if ( !data.dptr ) {
- DEBUG(3,("get_privileges: No privileges assigned to SID [%s]\n",
- sid_string_static(sid)));
+ DEBUG(3, ("get_privileges: No privileges assigned to SID "
+ "[%s]\n", sid_string_dbg(sid)));
return False;
}
@@ -123,8 +123,8 @@ bool get_privileges_for_sids(SE_PRIV *privileges, DOM_SID *slist, int scount)
if ( !get_privileges( &slist[i], &mask ) )
continue;
- DEBUG(5,("get_privileges_for_sids: sid = %s\nPrivilege set:\n",
- sid_string_static(&slist[i])));
+ DEBUG(5,("get_privileges_for_sids: sid = %s\nPrivilege "
+ "set:\n", sid_string_dbg(&slist[i])));
dump_se_priv( DBGC_ALL, 5, &mask );
se_priv_add( privileges, &mask );
@@ -266,7 +266,7 @@ bool grant_privilege(const DOM_SID *sid, const SE_PRIV *priv_mask)
se_priv_add( &new_mask, priv_mask );
- DEBUG(10,("grant_privilege: %s\n", sid_string_static(sid)));
+ DEBUG(10,("grant_privilege: %s\n", sid_string_dbg(sid)));
DEBUGADD( 10, ("original privilege mask:\n"));
dump_se_priv( DBGC_ALL, 10, &old_mask );
@@ -307,7 +307,7 @@ bool revoke_privilege(const DOM_SID *sid, const SE_PRIV *priv_mask)
if ( !get_privileges( sid, &mask ) )
return True;
- DEBUG(10,("revoke_privilege: %s\n", sid_string_static(sid)));
+ DEBUG(10,("revoke_privilege: %s\n", sid_string_dbg(sid)));
DEBUGADD( 10, ("original privilege mask:\n"));
dump_se_priv( DBGC_ALL, 10, &mask );
diff --git a/source3/lib/secdesc.c b/source3/lib/secdesc.c
index db299c4fe7..4a9785009b 100644
--- a/source3/lib/secdesc.c
+++ b/source3/lib/secdesc.c
@@ -93,24 +93,16 @@ bool sec_desc_equal(SEC_DESC *s1, SEC_DESC *s2)
/* Check owner and group */
if (!sid_equal(s1->owner_sid, s2->owner_sid)) {
- fstring str1, str2;
-
- sid_to_string(str1, s1->owner_sid);
- sid_to_string(str2, s2->owner_sid);
-
DEBUG(10, ("sec_desc_equal(): owner differs (%s != %s)\n",
- str1, str2));
+ sid_string_dbg(s1->owner_sid),
+ sid_string_dbg(s2->owner_sid)));
return False;
}
if (!sid_equal(s1->group_sid, s2->group_sid)) {
- fstring str1, str2;
-
- sid_to_string(str1, s1->group_sid);
- sid_to_string(str2, s2->group_sid);
-
DEBUG(10, ("sec_desc_equal(): group differs (%s != %s)\n",
- str1, str2));
+ sid_string_dbg(s1->group_sid),
+ sid_string_dbg(s2->group_sid)));
return False;
}
@@ -491,7 +483,6 @@ SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr,
SEC_ACE *new_ace = &new_ace_list[new_ace_list_ndx];
uint8 new_flags = 0;
bool inherit = False;
- fstring sid_str;
/* The OBJECT_INHERIT_ACE flag causes the ACE to be
inherited by non-container children objects. Container
@@ -547,12 +538,12 @@ SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr,
init_sec_ace(new_ace, &ace->trustee, ace->type,
new_ace->access_mask, new_flags);
- sid_to_string(sid_str, &ace->trustee);
-
DEBUG(5, ("se_create_child_secdesc(): %s:%d/0x%02x/0x%08x "
- " inherited as %s:%d/0x%02x/0x%08x\n", sid_str,
+ " inherited as %s:%d/0x%02x/0x%08x\n",
+ sid_string_dbg(&ace->trustee),
ace->type, ace->flags, ace->access_mask,
- sid_str, new_ace->type, new_ace->flags,
+ sid_string_dbg(&ace->trustee),
+ new_ace->type, new_ace->flags,
new_ace->access_mask));
new_ace_list_ndx++;
diff --git a/source3/lib/util_seaccess.c b/source3/lib/util_seaccess.c
index ad05300079..0481eea5f0 100644
--- a/source3/lib/util_seaccess.c
+++ b/source3/lib/util_seaccess.c
@@ -215,7 +215,6 @@ bool se_access_check(const SEC_DESC *sd, const NT_USER_TOKEN *token,
{
size_t i;
SEC_ACL *the_acl;
- fstring sid_str;
uint32 tmp_acc_desired = acc_desired;
if (!status || !acc_granted)
@@ -227,9 +226,10 @@ bool se_access_check(const SEC_DESC *sd, const NT_USER_TOKEN *token,
*status = NT_STATUS_OK;
*acc_granted = 0;
- DEBUG(10,("se_access_check: requested access 0x%08x, for NT token with %u entries and first sid %s.\n",
- (unsigned int)acc_desired, (unsigned int)token->num_sids,
- sid_to_string(sid_str, &token->user_sids[0])));
+ DEBUG(10,("se_access_check: requested access 0x%08x, for NT token "
+ "with %u entries and first sid %s.\n",
+ (unsigned int)acc_desired, (unsigned int)token->num_sids,
+ sid_string_dbg(&token->user_sids[0])));
/*
* No security descriptor or security descriptor with no DACL
@@ -247,11 +247,13 @@ bool se_access_check(const SEC_DESC *sd, const NT_USER_TOKEN *token,
/* The user sid is the first in the token */
if (DEBUGLVL(3)) {
- DEBUG(3, ("se_access_check: user sid is %s\n", sid_to_string(sid_str, &token->user_sids[PRIMARY_USER_SID_INDEX]) ));
+ DEBUG(3, ("se_access_check: user sid is %s\n",
+ sid_string_dbg(
+ &token->user_sids[PRIMARY_USER_SID_INDEX])));
for (i = 1; i < token->num_sids; i++) {
DEBUGADD(3, ("se_access_check: also %s\n",
- sid_to_string(sid_str, &token->user_sids[i])));
+ sid_string_dbg(&token->user_sids[i])));
}
}
@@ -282,11 +284,12 @@ bool se_access_check(const SEC_DESC *sd, const NT_USER_TOKEN *token,
for ( i = 0 ; i < the_acl->num_aces && tmp_acc_desired != 0; i++) {
SEC_ACE *ace = &the_acl->aces[i];
- DEBUGADD(10,("se_access_check: ACE %u: type %d, flags = 0x%02x, SID = %s mask = %x, current desired = %x\n",
- (unsigned int)i, ace->type, ace->flags,
- sid_to_string(sid_str, &ace->trustee),
- (unsigned int) ace->access_mask,
- (unsigned int)tmp_acc_desired ));
+ DEBUGADD(10,("se_access_check: ACE %u: type %d, flags = "
+ "0x%02x, SID = %s mask = %x, current desired "
+ "= %x\n", (unsigned int)i, ace->type, ace->flags,
+ sid_string_dbg(&ace->trustee),
+ (unsigned int) ace->access_mask,
+ (unsigned int)tmp_acc_desired ));
tmp_acc_desired = check_ace( ace, token, tmp_acc_desired, status);
if (NT_STATUS_V(*status)) {
diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c
index 344784aee2..e27c72dbc4 100644
--- a/source3/lib/util_sid.c
+++ b/source3/lib/util_sid.c
@@ -750,7 +750,7 @@ NTSTATUS sid_array_from_info3(TALLOC_CTX *mem_ctx,
if (!add_sid_to_array(mem_ctx, &info3->other_sids[i].sid,
&sid_array, &num_sids)) {
DEBUG(3, ("could not add SID to array: %s\n",
- sid_string_static(&info3->other_sids[i].sid)));
+ sid_string_dbg(&info3->other_sids[i].sid)));
return NT_STATUS_NO_MEMORY;
}
}