summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-08-07 20:10:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:00:27 -0500
commit617a99ec52d5e4684bbd851f0d7949c8607241e0 (patch)
tree067418268a14097b36fba1cf1b3e92ebdc340359
parent6d1f86d3f622ddd0bb907bc98c0c86948263918f (diff)
downloadsamba-617a99ec52d5e4684bbd851f0d7949c8607241e0.tar.gz
samba-617a99ec52d5e4684bbd851f0d7949c8607241e0.tar.bz2
samba-617a99ec52d5e4684bbd851f0d7949c8607241e0.zip
r9194: do not enumerate privileges when they are not enabled
(This used to be commit ff6e3464a2df7fd8a79da8f059a080934d9b3749)
-rw-r--r--source3/rpc_server/srv_lsa_nt.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c
index 15d420538e..b9db5c6b59 100644
--- a/source3/rpc_server/srv_lsa_nt.c
+++ b/source3/rpc_server/srv_lsa_nt.c
@@ -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;
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;