summaryrefslogtreecommitdiffstats
path: root/source3/libsmb/clientgen.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-02-25 22:25:25 +0000
committerJeremy Allison <jra@samba.org>2000-02-25 22:25:25 +0000
commit0f1eee5c7ac4031cd2a97524b1f65a24d0d618c2 (patch)
tree5213fb9aa9cb2a4ae1ea9ee288a5a8f2eabd8998 /source3/libsmb/clientgen.c
parent66018871c7eb1fedcdf8829b53038b6b484db6a3 (diff)
downloadsamba-0f1eee5c7ac4031cd2a97524b1f65a24d0d618c2.tar.gz
samba-0f1eee5c7ac4031cd2a97524b1f65a24d0d618c2.tar.xz
samba-0f1eee5c7ac4031cd2a97524b1f65a24d0d618c2.zip
client/client.c:
libsmb/clientgen.c: Fixes for Win2k smbclient browsing. Other fixes implement smbpasswd -x user to delete users. Also allows swat to do the same. Jeremy. (This used to be commit 9f6ad046761adecafba59040baa3abc9f0959e65)
Diffstat (limited to 'source3/libsmb/clientgen.c')
-rw-r--r--source3/libsmb/clientgen.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index df3df0b4ba3..8d7dbec8590 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -600,7 +600,7 @@ BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation)
/****************************************************************************
call a NetShareEnum - try and browse available connections on a host
****************************************************************************/
-BOOL cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *))
+int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *))
{
char *rparam = NULL;
char *rdata = NULL;
@@ -618,12 +618,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 */
{