summaryrefslogtreecommitdiffstats
path: root/source3/lib/substitute.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/substitute.c')
-rw-r--r--source3/lib/substitute.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c
index d4c7cd6467..bd15399b13 100644
--- a/source3/lib/substitute.c
+++ b/source3/lib/substitute.c
@@ -41,6 +41,7 @@ void set_local_machine_name(const char* local_name, bool perm)
{
static bool already_perm = False;
fstring tmp_local_machine;
+ char addr[INET6_ADDRSTRLEN];
fstrcpy(tmp_local_machine,local_name);
trim_char(tmp_local_machine,' ',' ');
@@ -51,7 +52,7 @@ void set_local_machine_name(const char* local_name, bool perm)
*/
if ( strequal(tmp_local_machine, "*SMBSERVER") || strequal(tmp_local_machine, "*SMBSERV") ) {
- fstrcpy( local_machine, client_socket_addr() );
+ fstrcpy( local_machine, client_socket_addr(addr, sizeof(addr)) );
return;
}
@@ -499,7 +500,8 @@ char *alloc_sub_basic(const char *smb_name, const char *domain_name,
client_addr(addr, sizeof(addr)));
break;
case 'i':
- a_string = realloc_string_sub( a_string, "%i", client_socket_addr() );
+ a_string = realloc_string_sub( a_string, "%i",
+ client_socket_addr(addr, sizeof(addr)) );
break;
case 'L' :
if ( StrnCaseCmp(p, "%LOGONSERVER%", strlen("%LOGONSERVER%")) == 0 ) {