diff options
author | Andreas Schneider <asn@samba.org> | 2011-06-16 14:23:54 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-07-04 18:28:34 +1000 |
commit | cbec251f9aa39ad5791570d349df8d265d7211d7 (patch) | |
tree | 34f8eebae3a68e035f67c3aaec17eedf99ea2055 /source3/modules | |
parent | c0f1c179b9ea1394b8273cbd12a84276585c3636 (diff) | |
download | samba-cbec251f9aa39ad5791570d349df8d265d7211d7.tar.gz samba-cbec251f9aa39ad5791570d349df8d265d7211d7.tar.bz2 samba-cbec251f9aa39ad5791570d349df8d265d7211d7.zip |
s3-vfs: Replace client_id in exand msdfs.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/modules')
-rw-r--r-- | source3/modules/vfs_expand_msdfs.c | 10 |
1 files changed, 9 insertions, 1 deletions
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)); |