summaryrefslogtreecommitdiff
path: root/source3/lib/substitute.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-11-03 22:34:46 -0700
committerJeremy Allison <jra@samba.org>2007-11-03 22:34:46 -0700
commit51a0354d751f48a2542984c81e218da33669bbeb (patch)
tree27e620eb5d4e72e2a07591645680e6776491702b /source3/lib/substitute.c
parent56aa420195f4bf8007fbbbe362dbaf961a97f423 (diff)
downloadsamba-51a0354d751f48a2542984c81e218da33669bbeb.tar.gz
samba-51a0354d751f48a2542984c81e218da33669bbeb.tar.bz2
samba-51a0354d751f48a2542984c81e218da33669bbeb.zip
Remove more static data from lib/util_sock.c and
callers. Jeremy. (This used to be commit 35aaa36f82c70964cee5d0778eb04547b226dd3f)
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 ) {