From cbec251f9aa39ad5791570d349df8d265d7211d7 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 16 Jun 2011 14:23:54 +0200 Subject: s3-vfs: Replace client_id in exand msdfs. Signed-off-by: Andrew Bartlett --- source3/modules/vfs_expand_msdfs.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source3/modules/vfs_expand_msdfs.c') diff --git a/source3/modules/vfs_expand_msdfs.c b/source3/modules/vfs_expand_msdfs.c index eb7c6fed6b..76a918f754 100644 --- a/source3/modules/vfs_expand_msdfs.c +++ b/source3/modules/vfs_expand_msdfs.c @@ -23,6 +23,7 @@ #include "../librpc/gen_ndr/ndr_netlogon.h" #include "smbd/globals.h" #include "auth.h" +#include "../lib/tsocket/tsocket.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_VFS @@ -117,6 +118,7 @@ static char *expand_msdfs_target(TALLOC_CTX *ctx, int filename_len = 0; char *targethost = NULL; char *new_target = NULL; + char *raddr; if (filename_start == NULL) { DEBUG(10, ("No filename start in %s\n", target)); @@ -139,8 +141,14 @@ static char *expand_msdfs_target(TALLOC_CTX *ctx, DEBUG(10, ("Expanding from table [%s]\n", mapfilename)); + raddr = tsocket_address_inet_addr_string(conn->sconn->remote_address, + ctx); + if (raddr == NULL) { + return NULL; + } + targethost = read_target_host( - ctx, conn->sconn->client_id.addr, mapfilename); + ctx, raddr, mapfilename); if (targethost == NULL) { DEBUG(1, ("Could not expand target host from file %s\n", mapfilename)); -- cgit