summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-06-24 19:09:03 +0000
committerLuke Leighton <lkcl@samba.org>1999-06-24 19:09:03 +0000
commit1dc6c6c7ca54578d9e6040a9d4d5e509f1ad3af3 (patch)
treed9999e82844d4cb0da1a588633998de6ef07f174
parentf63e8070488e079c899cde90e8452796f3af4e5f (diff)
downloadsamba-1dc6c6c7ca54578d9e6040a9d4d5e509f1ad3af3.tar.gz
samba-1dc6c6c7ca54578d9e6040a9d4d5e509f1ad3af3.tar.bz2
samba-1dc6c6c7ca54578d9e6040a9d4d5e509f1ad3af3.zip
use nmb_safe_namestr.
(This used to be commit de9a38b0bcb5adcb6e502f2200d3e84bdcbdfc48)
-rw-r--r--source3/libsmb/clientgen.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index cb0f2e5c74..4f73b6e51b 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -2634,8 +2634,14 @@ BOOL cli_establish_connection(struct cli_state *cli,
char *service, char *service_type,
BOOL do_shutdown, BOOL do_tcon)
{
+ fstring callingstr;
+ fstring calledstr;
+
+ nmb_safe_namestr(calling, callingstr, sizeof(callingstr));
+ nmb_safe_namestr(called , calledstr , sizeof(calledstr ));
+
DEBUG(5,("cli_establish_connection: %s connecting to %s (%s) - %s [%s]\n",
- nmb_namestr(calling), nmb_namestr(called), inet_ntoa(*dest_ip),
+ callingstr, calledstr, inet_ntoa(*dest_ip),
cli->user_name, cli->domain));
/* establish connection */
@@ -2650,7 +2656,7 @@ BOOL cli_establish_connection(struct cli_state *cli,
if (!cli_connect(cli, dest_host, dest_ip))
{
DEBUG(1,("cli_establish_connection: failed to connect to %s (%s)\n",
- nmb_namestr(calling), inet_ntoa(*dest_ip)));
+ callingstr, inet_ntoa(*dest_ip)));
return False;
}
}
@@ -2763,7 +2769,6 @@ BOOL cli_establish_connection(struct cli_state *cli,
return True;
}
-
/****************************************************************************
connect to one of multiple servers: don't care which
****************************************************************************/