summaryrefslogtreecommitdiff
path: root/source3/lib/substitute.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-11-03 18:15:45 -0700
committerJeremy Allison <jra@samba.org>2007-11-03 18:15:45 -0700
commit6658165d5e9cd186fea74e1581091233e8990e9b (patch)
tree13d5e5fd6d9d93adb4e60e58c5abacbbb959ecc7 /source3/lib/substitute.c
parent73d407968002587eadd0ff13eb413ddf07c78771 (diff)
downloadsamba-6658165d5e9cd186fea74e1581091233e8990e9b.tar.gz
samba-6658165d5e9cd186fea74e1581091233e8990e9b.tar.bz2
samba-6658165d5e9cd186fea74e1581091233e8990e9b.zip
Stop get_peer_addr() and client_addr() from using global
statics. Part of my library cleanups. Jeremy. (This used to be commit e848506c858bd16706c1d7f6b4b032005512b8ac)
Diffstat (limited to 'source3/lib/substitute.c')
-rw-r--r--source3/lib/substitute.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c
index 07cea81bd1..a6195ef9d7 100644
--- a/source3/lib/substitute.c
+++ b/source3/lib/substitute.c
@@ -449,6 +449,7 @@ char *alloc_sub_basic(const char *smb_name, const char *domain_name,
char *b, *p, *s, *r, *a_string;
fstring pidstr, vnnstr;
struct passwd *pass;
+ char addr[INET6_ADDRSTRLEN];
const char *local_machine_name = get_local_machine_name();
/* workaround to prevent a crash while looking at bug #687 */
@@ -494,7 +495,7 @@ char *alloc_sub_basic(const char *smb_name, const char *domain_name,
a_string = realloc_string_sub(a_string, "%D", r);
break;
case 'I' :
- a_string = realloc_string_sub(a_string, "%I", client_addr());
+ a_string = realloc_string_sub(a_string, "%I", client_addr(addr));
break;
case 'i':
a_string = realloc_string_sub( a_string, "%i", client_socket_addr() );