diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-08-30 12:50:49 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-09-11 18:46:09 +1000 |
commit | 0e2142a9275b567a3c6a8f90e95240d9e686ec27 (patch) | |
tree | 40d28f6cef551b73491bc1c05235552bbb1c005b /libcli | |
parent | 2387e3bcfeb4c2e54342a8fff4b157e9ba68024b (diff) | |
download | samba-0e2142a9275b567a3c6a8f90e95240d9e686ec27.tar.gz samba-0e2142a9275b567a3c6a8f90e95240d9e686ec27.tar.bz2 samba-0e2142a9275b567a3c6a8f90e95240d9e686ec27.zip |
s3-privs Remove pointer indirection from se_priv_to_privilege_set()
Andrew Bartlett
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'libcli')
-rw-r--r-- | libcli/security/privileges.c | 4 | ||||
-rw-r--r-- | libcli/security/privileges.h | 2 |
2 files changed, 3 insertions, 3 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 ); /* |