summaryrefslogtreecommitdiff
path: root/libcli
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-08-27 11:27:57 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-09-11 18:46:08 +1000
commiteb8e3155dee3e4258a603da61a9e7822503cd8dd (patch)
tree0a36829633536a130978de78c91ec6cf9bb1db66 /libcli
parentcdda15c062369d94bc468dce7b541ea505d664e5 (diff)
downloadsamba-eb8e3155dee3e4258a603da61a9e7822503cd8dd.tar.gz
samba-eb8e3155dee3e4258a603da61a9e7822503cd8dd.tar.bz2
samba-eb8e3155dee3e4258a603da61a9e7822503cd8dd.zip
libcli/privileges Simplify get_privilege_luid() to return just the enum
As Samba only deals with the lower 32 bits of the LUID, just return those and let the LSA layer deal with the upper 0 bits. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'libcli')
-rw-r--r--libcli/security/privileges.c11
-rw-r--r--libcli/security/privileges.h2
2 files changed, 4 insertions, 9 deletions
diff --git a/libcli/security/privileges.c b/libcli/security/privileges.c
index 63765ff454..4815d1837c 100644
--- a/libcli/security/privileges.c
+++ b/libcli/security/privileges.c
@@ -316,24 +316,19 @@ int count_all_privileges( void )
so we are guaranteed to find it in the list.
*********************************************************************/
-struct lsa_LUIDAttribute get_privilege_luid( uint64_t *privilege_mask )
+enum sec_privilege get_privilege_luid( uint64_t *privilege_mask )
{
- struct lsa_LUIDAttribute priv_luid;
int i;
uint32_t num_privs = ARRAY_SIZE(privs);
- ZERO_STRUCT( priv_luid );
-
for ( i=0; i<num_privs; i++ ) {
if ( se_priv_equal( &privs[i].privilege_mask, privilege_mask ) ) {
- priv_luid.luid.low = privs[i].luid;
- priv_luid.luid.high = 0;
- break;
+ return privs[i].luid;
}
}
- return priv_luid;
+ return 0;
}
/****************************************************************************
diff --git a/libcli/security/privileges.h b/libcli/security/privileges.h
index f3fd75f8fb..e1cfbbb404 100644
--- a/libcli/security/privileges.h
+++ b/libcli/security/privileges.h
@@ -148,7 +148,7 @@ int count_all_privileges( void );
so we are guaranteed to find it in the list.
*********************************************************************/
-struct lsa_LUIDAttribute get_privilege_luid( uint64_t *privilege_mask );
+enum sec_privilege get_privilege_luid( uint64_t *privilege_mask );
/****************************************************************************
Convert a LUID to a named string
****************************************************************************/