struct lsa_info *handle;
uint32 i;
uint32 enum_context = q_u->enum_context;
- int num_privs = count_all_privileges();
+ int num_privs = 0;
LSA_PRIV_ENTRY *entries = NULL;
LUID_ATTR luid;
/* 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 )
return NT_STATUS_NO_MORE_ENTRIES;