From d30b6ab54847164aa3add34f3b50132af58f9453 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Thu, 12 Nov 1998 22:17:51 +0000 Subject: .cvsignore: Removed old entries. client/client.c: include/client.h: Added some debug messages that the old client used to generate. These are needed to make scripts such as 'findsmb' work - there may be other changes to keep backwards output compatibility. Do we need a -old-client-compat argument ? libsmb/clientgen.c: Fixed crash bug where malloc'ed data wasn't being cleared - corrupted malloc chains. web/swat.c: John's changes to get rid of "ghost" table entries. (This used to be commit 3c45a3503ea57d17e98eb3e57514161a5c82e45e) --- source3/libsmb/clientgen.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'source3/libsmb') diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index b4ca7a1d77..4eaebfa6ed 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -772,6 +772,20 @@ BOOL cli_session_setup(struct cli_state *cli, /* use the returned vuid from now on */ cli->vuid = SVAL(cli->inbuf,smb_uid); + if (cli->protocol >= PROTOCOL_NT1) { + /* + * Save off some of the connected server + * info. + */ + char *server_domain,*server_os,*server_type; + server_os = smb_buf(cli->inbuf); + server_type = skip_string(server_os,1); + server_domain = skip_string(server_type,1); + fstrcpy(cli->server_os, server_os); + fstrcpy(cli->server_type, server_type); + fstrcpy(cli->server_domain, server_domain); + } + fstrcpy(cli->user_name, user); return True; @@ -2349,7 +2363,9 @@ struct cli_state *cli_initialise(struct cli_state *cli) { if (!cli) { cli = (struct cli_state *)malloc(sizeof(*cli)); - if (!cli) return NULL; + if (!cli) + return NULL; + ZERO_STRUCTP(cli); } if (cli->initialised) { -- cgit