diff options
-rw-r--r-- | libcli/security/privileges.c | 9 | ||||
-rw-r--r-- | source3/auth/token_util.c | 2 | ||||
-rw-r--r-- | source3/lib/privileges.c | 16 | ||||
-rw-r--r-- | source3/rpc_server/srv_lsa_nt.c | 6 |
4 files changed, 9 insertions, 24 deletions
diff --git a/libcli/security/privileges.c b/libcli/security/privileges.c index d72401af3f..f4f3321198 100644 --- a/libcli/security/privileges.c +++ b/libcli/security/privileges.c @@ -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 ****************************************************************************/ diff --git a/source3/auth/token_util.c b/source3/auth/token_util.c index 46637b348b..e8334c6306 100644 --- a/source3/auth/token_util.c +++ b/source3/auth/token_util.c @@ -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)); } /**************************************************************************** diff --git a/source3/lib/privileges.c b/source3/lib/privileges.c index 4713bc0700..61425e8272 100644 --- a/source3/lib/privileges.c +++ b/source3/lib/privileges.c @@ -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 ); } diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c index 48d5609e0f..2f7e975b82 100644 --- a/source3/rpc_server/srv_lsa_nt.c +++ b/source3/rpc_server/srv_lsa_nt.c @@ -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; } |