mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
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>
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user