summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcli/security/privileges.c4
-rw-r--r--libcli/security/privileges.h2
-rw-r--r--source3/rpc_server/srv_lsa_nt.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/libcli/security/privileges.c b/libcli/security/privileges.c
index a33ef57a60..054ba57e37 100644
--- a/libcli/security/privileges.c
+++ b/libcli/security/privileges.c
@@ -469,7 +469,7 @@ static bool privilege_set_add(PRIVILEGE_SET *priv_set, struct lsa_LUIDAttribute
/*******************************************************************
*******************************************************************/
-bool se_priv_to_privilege_set( PRIVILEGE_SET *set, uint64_t *privilege_mask )
+bool se_priv_to_privilege_set( PRIVILEGE_SET *set, uint64_t privilege_mask )
{
int i;
uint32_t num_privs = ARRAY_SIZE(privs);
@@ -479,7 +479,7 @@ bool se_priv_to_privilege_set( PRIVILEGE_SET *set, uint64_t *privilege_mask )
luid.luid.high = 0;
for ( i=0; i<num_privs; i++ ) {
- if ( !is_privilege_assigned(privilege_mask, &privs[i].privilege_mask) )
+ if ((privilege_mask & privs[i].privilege_mask) == 0)
continue;
luid.luid.high = 0;
diff --git a/libcli/security/privileges.h b/libcli/security/privileges.h
index e715c468c2..34f7d06f8c 100644
--- a/libcli/security/privileges.h
+++ b/libcli/security/privileges.h
@@ -141,7 +141,7 @@ int num_privileges_in_short_list( void );
const char *luid_to_privilege_name(const struct lsa_LUID *set);
-bool se_priv_to_privilege_set( PRIVILEGE_SET *set, uint64_t *privilege_mask );
+bool se_priv_to_privilege_set( PRIVILEGE_SET *set, uint64_t privilege_mask );
bool privilege_set_to_se_priv( uint64_t *privilege_mask, struct lsa_PrivilegeSet *privset );
/*
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c
index e54bd9613f..81bbd4fc8c 100644
--- a/source3/rpc_server/srv_lsa_nt.c
+++ b/source3/rpc_server/srv_lsa_nt.c
@@ -1858,7 +1858,7 @@ NTSTATUS _lsa_EnumPrivsAccount(struct pipes_struct *p,
goto done;
}
- if ( se_priv_to_privilege_set( &privileges, &mask ) ) {
+ if ( se_priv_to_privilege_set( &privileges, mask ) ) {
DEBUG(10,("_lsa_EnumPrivsAccount: %s has %d privileges\n",
sid_string_dbg(&info->sid),
@@ -2376,7 +2376,7 @@ NTSTATUS _lsa_EnumAccountRights(struct pipes_struct *p,
return status;
}
- se_priv_to_privilege_set(&privileges, &mask);
+ se_priv_to_privilege_set(&privileges, mask);
DEBUG(10,("_lsa_EnumAccountRights: %s has %d privileges\n",
sid_string_dbg(&sid), privileges.count));