1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-01 04:58:35 +03:00

s3-privs Inline dump_se_priv into callers now that it's just a uint64_t

The previous 128 bit structure needed this helper function.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
This commit is contained in:
Andrew Bartlett 2010-08-27 10:04:05 +10:00
parent f85b822bd4
commit b29b6c13a3
4 changed files with 9 additions and 24 deletions

View File

@ -176,15 +176,6 @@ bool se_priv_from_name( const char *name, uint64_t *privilege_mask )
return false;
}
/***************************************************************************
dump an uint64_t structure to the log files
****************************************************************************/
void dump_se_priv( int dbg_cl, int dbg_lvl, const uint64_t *privilege_mask )
{
DEBUGADDC( dbg_cl, dbg_lvl,("uint64_t 0x%llx\n", (unsigned long long)*privilege_mask));
}
/****************************************************************************
check if the privilege is in the privilege list
****************************************************************************/

View File

@ -671,7 +671,7 @@ void debug_nt_user_token(int dbg_class, int dbg_lev, struct security_token *toke
("SID[%3lu]: %s\n", (unsigned long)i,
sid_string_dbg(&token->sids[i])));
dump_se_priv( dbg_class, dbg_lev, &token->privilege_mask );
DEBUGADDC(dbg_class, dbg_lev,("Privilege mask: 0x%llx\n", (unsigned long long)token->privilege_mask));
}
/****************************************************************************

View File

@ -139,8 +139,8 @@ bool get_privileges_for_sids(uint64_t *privileges, struct dom_sid *slist, int sc
continue;
DEBUG(5,("get_privileges_for_sids: sid = %s\nPrivilege "
"set:\n", sid_string_dbg(&slist[i])));
dump_se_priv( DBGC_ALL, 5, &mask );
"set: 0x%llx\n", sid_string_dbg(&slist[i]),
(unsigned long long)mask));
se_priv_add( privileges, &mask );
found = True;
@ -285,11 +285,9 @@ bool grant_privilege(const struct dom_sid *sid, const uint64_t *priv_mask)
DEBUG(10,("grant_privilege: %s\n", sid_string_dbg(sid)));
DEBUGADD( 10, ("original privilege mask:\n"));
dump_se_priv( DBGC_ALL, 10, &old_mask );
DEBUGADD( 10, ("original privilege mask: 0x%llx\n", (unsigned long long)new_mask));
DEBUGADD( 10, ("new privilege mask:\n"));
dump_se_priv( DBGC_ALL, 10, &new_mask );
DEBUGADD( 10, ("new privilege mask: 0x%llx\n", (unsigned long long)new_mask));
return set_privileges( sid, &new_mask );
}
@ -326,13 +324,11 @@ bool revoke_privilege(const struct dom_sid *sid, const uint64_t *priv_mask)
DEBUG(10,("revoke_privilege: %s\n", sid_string_dbg(sid)));
DEBUGADD( 10, ("original privilege mask:\n"));
dump_se_priv( DBGC_ALL, 10, &mask );
DEBUGADD( 10, ("original privilege mask: 0x%llx\n", (unsigned long long)mask));
se_priv_remove( &mask, priv_mask );
DEBUGADD( 10, ("new privilege mask:\n"));
dump_se_priv( DBGC_ALL, 10, &mask );
DEBUGADD( 10, ("new privilege mask: 0x%llx\n", (unsigned long long)mask));
return set_privileges( sid, &mask );
}

View File

@ -2017,8 +2017,7 @@ NTSTATUS _lsa_AddPrivilegesToAccount(struct pipes_struct *p,
if ( !grant_privilege( &info->sid, &mask ) ) {
DEBUG(3,("_lsa_AddPrivilegesToAccount: grant_privilege(%s) failed!\n",
sid_string_dbg(&info->sid) ));
DEBUG(3,("Privilege mask:\n"));
dump_se_priv( DBGC_ALL, 3, &mask );
DEBUG(3,("Privilege mask: 0x%llx\n", (unsigned long long)mask));
return NT_STATUS_NO_SUCH_PRIVILEGE;
}
@ -2057,8 +2056,7 @@ NTSTATUS _lsa_RemovePrivilegesFromAccount(struct pipes_struct *p,
if ( !revoke_privilege( &info->sid, &mask ) ) {
DEBUG(3,("_lsa_RemovePrivilegesFromAccount: revoke_privilege(%s) failed!\n",
sid_string_dbg(&info->sid) ));
DEBUG(3,("Privilege mask:\n"));
dump_se_priv( DBGC_ALL, 3, &mask );
DEBUG(3,("Privilege mask: 0x%llx\n", (unsigned long long)mask));
return NT_STATUS_NO_SUCH_PRIVILEGE;
}