summaryrefslogtreecommitdiff
path: root/source3/utils
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/utils
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/utils')
-rw-r--r--source3/utils/net_sam.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/utils/net_sam.c b/source3/utils/net_sam.c
index 99eac045e0..6a9e261ea0 100644
--- a/source3/utils/net_sam.c
+++ b/source3/utils/net_sam.c
@@ -631,8 +631,6 @@ static int net_sam_policy(struct net_context *c, int argc, const char **argv)
return net_run_function(c, argc, argv, "net sam policy", func);
}
-extern PRIVS privs[];
-
static int net_sam_rights_list(struct net_context *c, int argc,
const char **argv)
{
@@ -647,10 +645,10 @@ static int net_sam_rights_list(struct net_context *c, int argc,
if (argc == 0) {
int i;
- int num = count_all_privileges();
+ int num = num_privileges_in_short_list();
for (i=0; i<num; i++) {
- d_printf("%s\n", privs[i].name);
+ d_printf("%s\n", sec_privilege_name_from_index(i));
}
return 0;
}