diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/smb.h | 4 | ||||
-rw-r--r-- | source3/pipesrvsvc.c | 8 | ||||
-rw-r--r-- | source3/srvparse.c | 6 |
3 files changed, 13 insertions, 5 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h index 7fa19eaa19..0d10bd5895 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -865,9 +865,11 @@ typedef struct share_info_ctr { uint32 num_entries_read; /* EntriesRead */ uint32 ptr_share_info; /* Buffer */ + uint32 num_entries_read2; /* EntriesRead */ SH_INFO_1 info_1 [MAX_SHARE_ENTRIES]; /* share entry pointers */ SH_INFO_1_STR info_1_str[MAX_SHARE_ENTRIES]; /* share entry strings */ - uint32 num_entries_read2; /* EntriesRead2 */ + uint32 num_entries_read3; /* EntriesRead2 */ + uint32 padding; /* padding */ } SHARE_INFO_1_CTR; diff --git a/source3/pipesrvsvc.c b/source3/pipesrvsvc.c index 10c8d97e75..28a304ef4a 100644 --- a/source3/pipesrvsvc.c +++ b/source3/pipesrvsvc.c @@ -37,8 +37,8 @@ static void make_srv_share_info1_str(SH_INFO_1_STR *sh1, char *net_name, char *r DEBUG(5,("make_srv_share_info1_str: %s %s\n", net_name, remark)); - make_unistr2(&(sh1->uni_netname), net_name, strlen(net_name)); - make_unistr2(&(sh1->uni_remark ), remark , strlen(remark )); + make_unistr2(&(sh1->uni_netname), net_name, strlen(net_name)+1); + make_unistr2(&(sh1->uni_remark ), remark , strlen(remark )+1); } /******************************************************************* @@ -103,8 +103,10 @@ static void make_srv_share_1_ctr(SHARE_INFO_1_CTR *ctr) } ctr->num_entries_read = num_entries; - ctr->ptr_share_info = num_entries > 0 ? 1 : 0; + ctr->ptr_share_info = num_entries > 0 ? 1 : 0; ctr->num_entries_read2 = num_entries; + ctr->num_entries_read3 = num_entries; + ctr->padding = 0; } /******************************************************************* diff --git a/source3/srvparse.c b/source3/srvparse.c index a94efff138..8138285caf 100644 --- a/source3/srvparse.c +++ b/source3/srvparse.c @@ -85,6 +85,8 @@ char* srv_io_share_1_ctr(BOOL io, SHARE_INFO_1_CTR *ctr, char *q, char *base, in num_entries = MAX_SHARE_ENTRIES; /* report this! */ } + DBG_RW_IVAL("num_entries_read2", depth, base, io, q, ctr->num_entries_read2); q += 4; + for (i = 0; i < num_entries; i++) { q = srv_io_share_info1(io, &(ctr->info_1[i]), q, base, align, depth); @@ -95,7 +97,9 @@ char* srv_io_share_1_ctr(BOOL io, SHARE_INFO_1_CTR *ctr, char *q, char *base, in q = srv_io_share_info1_str(io, &(ctr->info_1_str[i]), q, base, align, depth); } - DBG_RW_IVAL("num_entries_read2", depth, base, io, q, ctr->num_entries_read); q += 4; + q = align_offset(q, base, align); + DBG_RW_IVAL("num_entries_read3", depth, base, io, q, ctr->num_entries_read3); q += 4; + DBG_RW_IVAL("padding ", depth, base, io, q, ctr->padding); q += 4; } return q; |