diff options
-rw-r--r-- | libcli/security/privileges.c | 11 | ||||
-rw-r--r-- | libcli/security/privileges.h | 2 | ||||
-rw-r--r-- | source3/rpc_server/srv_lsa_nt.c | 6 |
3 files changed, 6 insertions, 13 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 ****************************************************************************/ diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c index 2f7e975b82..449b5c894f 100644 --- a/source3/rpc_server/srv_lsa_nt.c +++ b/source3/rpc_server/srv_lsa_nt.c @@ -1497,10 +1497,8 @@ NTSTATUS _lsa_EnumPrivs(struct pipes_struct *p, init_lsa_StringLarge(&entries[i].name, privs[i].name); - luid = get_privilege_luid( &privs[i].privilege_mask ); - - entries[i].luid.low = luid.luid.low; - entries[i].luid.high = luid.luid.high; + entries[i].luid.low = get_privilege_luid( &privs[i].privilege_mask ); + entries[i].luid.high = 0; } } |