summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorHerb Lewis <herb@samba.org>1998-11-12 22:17:51 +0000
committerHerb Lewis <herb@samba.org>1998-11-12 22:17:51 +0000
commitd30b6ab54847164aa3add34f3b50132af58f9453 (patch)
tree3b1186b6aed88b9e947ad4e9d5f7b3484482e007 /source3/libsmb
parent959f32c6d79cfcbfafb7ecde24addff0b0f0d5dd (diff)
downloadsamba-d30b6ab54847164aa3add34f3b50132af58f9453.tar.gz
samba-d30b6ab54847164aa3add34f3b50132af58f9453.tar.bz2
samba-d30b6ab54847164aa3add34f3b50132af58f9453.zip
.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)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clientgen.c18
1 files changed, 17 insertions, 1 deletions
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) {