summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-08-27 12:19:09 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-09-11 18:46:08 +1000
commitcbd72ab93bc35aa71a55b190cd999dda4106be07 (patch)
tree72327385378a4efdd39c2a4f46b096f33a5b11cc /source3/rpc_server
parent33ce8633d6a5e5cc54209c92397025114f0a46ea (diff)
downloadsamba-cbd72ab93bc35aa71a55b190cd999dda4106be07.tar.gz
samba-cbd72ab93bc35aa71a55b190cd999dda4106be07.tar.bz2
samba-cbd72ab93bc35aa71a55b190cd999dda4106be07.zip
libcli/security Don't export privs[] as a global variable
Instead, provide access functions for the LSA and net sam callers for the information they need. They still only enumerate the first 8 privileges that have traditionally been exposed. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_lsa_nt.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c
index 6eee899530..c787502a35 100644
--- a/source3/rpc_server/srv_lsa_nt.c
+++ b/source3/rpc_server/srv_lsa_nt.c
@@ -39,8 +39,6 @@
#define MAX_LOOKUP_SIDS 0x5000 /* 20480 */
-extern PRIVS privs[];
-
enum lsa_handle_type { LSA_HANDLE_POLICY_TYPE = 1, LSA_HANDLE_ACCOUNT_TYPE };
struct lsa_info {
@@ -1454,7 +1452,6 @@ NTSTATUS _lsa_EnumPrivs(struct pipes_struct *p,
uint32 enum_context = *r->in.resume_handle;
int num_privs = num_privileges_in_short_list();
struct lsa_PrivEntry *entries = NULL;
- struct lsa_LUIDAttribute luid;
/* remember that the enum_context starts at 0 and not 1 */
@@ -1495,9 +1492,9 @@ NTSTATUS _lsa_EnumPrivs(struct pipes_struct *p,
entries[i].luid.high = 0;
} else {
- init_lsa_StringLarge(&entries[i].name, privs[i].name);
+ init_lsa_StringLarge(&entries[i].name, sec_privilege_name_from_index(i));
- entries[i].luid.low = get_privilege_luid( &privs[i].privilege_mask );
+ entries[i].luid.low = sec_privilege_from_index(i);
entries[i].luid.high = 0;
}
}