* samba/libsmb/clientgen.c (cli_RNetShareEnum): Fix Win2k

"out of server memory" error.  From samba 2.0.7 patchset.
This commit is contained in:
Andrew V. Samoilov 2001-10-16 07:02:32 +00:00
parent 67958707a3
commit b7339b590f
2 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2001-10-16 Andrew V. Samoilov <kai@cmail.ru>
* samba/libsmb/clientgen.c (cli_RNetShareEnum): Fix Win2k
"out of server memory" error. From samba 2.0.7 patchset.
2001-10-07 Pavel Roskin <proski@gnu.org>
* vfs.c (vfs_parse_filetype): Fix fallback to fifo if sockets

View File

@ -553,12 +553,16 @@ BOOL cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, c
pstrcpy(p,"B13BWz");
p = skip_string(p,1);
SSVAL(p,0,1);
SSVAL(p,2,0xFFFF);
/*
* Win2k needs a *smaller* buffer than 0xFFFF here -
* it returns "out of server memory" with 0xFFFF !!! JRA.
*/
SSVAL(p,2,0xFFE0);
p += 4;
if (cli_api(cli,
param, PTR_DIFF(p,param), 1024, /* Param, length, maxlen */
NULL, 0, 0xFFFF, /* data, length, maxlen */
NULL, 0, 0xFFE0, /* data, length, maxlen - Win2k needs a small buffer here too ! */
&rparam, &rprcnt, /* return params, length */
&rdata, &rdrcnt)) /* return data, length */
{