mirror of
https://github.com/samba-team/samba.git
synced 2025-11-29 16:23:52 +03:00
r9194: do not enumerate privileges when they are not enabled
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
df85b41462
commit
ff6e3464a2
@@ -805,12 +805,17 @@ NTSTATUS _lsa_enum_privs(pipes_struct *p, LSA_Q_ENUM_PRIVS *q_u, LSA_R_ENUM_PRIV
|
|||||||
struct lsa_info *handle;
|
struct lsa_info *handle;
|
||||||
uint32 i;
|
uint32 i;
|
||||||
uint32 enum_context = q_u->enum_context;
|
uint32 enum_context = q_u->enum_context;
|
||||||
int num_privs = count_all_privileges();
|
int num_privs = 0;
|
||||||
LSA_PRIV_ENTRY *entries = NULL;
|
LSA_PRIV_ENTRY *entries = NULL;
|
||||||
LUID_ATTR luid;
|
LUID_ATTR luid;
|
||||||
|
|
||||||
/* remember that the enum_context starts at 0 and not 1 */
|
/* remember that the enum_context starts at 0 and not 1 */
|
||||||
|
|
||||||
|
if ( lp_enable_privileges() )
|
||||||
|
num_privs = count_all_privileges();
|
||||||
|
else
|
||||||
|
DEBUG(0,("_lsa_enum_privs: client trying to enumerate privileges by not enabled in smb.conf!\n"));
|
||||||
|
|
||||||
if ( enum_context >= num_privs )
|
if ( enum_context >= num_privs )
|
||||||
return NT_STATUS_NO_MORE_ENTRIES;
|
return NT_STATUS_NO_MORE_ENTRIES;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user