[SCM] Samba Shared Repository - branch master updated
Michael Adam
obnox at samba.org
Wed Aug 21 09:31:02 MDT 2013
The branch, master has been updated
via 6e82f70 Fix bug #10100 - rpcclient crashes when sending the 'netshareenum 502' command
from 534af20 smbd: Simplify new_break_message_smb1
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 6e82f70da089964994fcb179c40bdc8275be2da9
Author: Jeremy Allison <jra at samba.org>
Date: Tue Aug 20 10:55:27 2013 -0700
Fix bug #10100 - rpcclient crashes when sending the 'netshareenum 502' command
We are using the wrong variable for the returned count.
Reported by <pisymbol at gmail.com>.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
Autobuild-User(master): Michael Adam <obnox at samba.org>
Autobuild-Date(master): Wed Aug 21 17:30:33 CEST 2013 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
source3/rpcclient/cmd_srvsvc.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/rpcclient/cmd_srvsvc.c b/source3/rpcclient/cmd_srvsvc.c
index 0d67639..e5fa065 100644
--- a/source3/rpcclient/cmd_srvsvc.c
+++ b/source3/rpcclient/cmd_srvsvc.c
@@ -273,6 +273,7 @@ static WERROR cmd_srvsvc_net_share_enum_int(struct rpc_pipe_client *cli,
WERROR result;
NTSTATUS status;
uint32_t totalentries = 0;
+ uint32_t count = 0;
uint32_t resume_handle = 0;
uint32_t *resume_handle_p = NULL;
uint32 preferred_len = 0xffffffff, i;
@@ -374,15 +375,18 @@ static WERROR cmd_srvsvc_net_share_enum_int(struct rpc_pipe_client *cli,
switch (info_level) {
case 1:
- for (i = 0; i < totalentries; i++)
+ count = info_ctr.ctr.ctr1->count;
+ for (i = 0; i < count; i++)
display_share_info_1(&info_ctr.ctr.ctr1->array[i]);
break;
case 2:
- for (i = 0; i < totalentries; i++)
+ count = info_ctr.ctr.ctr2->count;
+ for (i = 0; i < count; i++)
display_share_info_2(&info_ctr.ctr.ctr2->array[i]);
break;
case 502:
- for (i = 0; i < totalentries; i++)
+ count = info_ctr.ctr.ctr502->count;
+ for (i = 0; i < count; i++)
display_share_info_502(&info_ctr.ctr.ctr502->array[i]);
break;
default:
--
Samba Shared Repository
More information about the samba-cvs
mailing list