diff options
author | Jeremy Allison <jra@samba.org> | 2006-08-02 16:18:45 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:38:29 -0500 |
commit | f569db1c06848b4205c141938e0d11359855673e (patch) | |
tree | 93c9c2a43c101cae60592c92e9ef1096483c4857 /source3/smbd | |
parent | 8e1fec05cbab33fae372794f3dff1cb5fccac809 (diff) | |
download | samba-f569db1c06848b4205c141938e0d11359855673e.tar.gz samba-f569db1c06848b4205c141938e0d11359855673e.tar.bz2 samba-f569db1c06848b4205c141938e0d11359855673e.zip |
r17376: Fix bug #3985 - ensure in msdfs we check for our
netbios aliases. Reported by Björn Jacke <bjoern@j3e.de>.
Probably needs to be in 3.0.23b (if Björn approves
of the fix).
Jeremy.
(This used to be commit e9e711fe37d9aec28b329dbfe2ad3ebfc1771825)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/msdfs.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c index 6891022264..2edad311ea 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -517,13 +517,10 @@ BOOL get_referred_path(TALLOC_CTX *ctx, char *pathname, struct junction_map *juc parse_dfs_path(pathname, &dp); /* Verify hostname in path */ - if ( !strequal(get_local_machine_name(), dp.hostname) ) { - /* Hostname mismatch, check if one of our IP addresses */ - if (!ismyip(*interpret_addr2(dp.hostname))) { - DEBUG(3, ("get_referred_path: Invalid hostname %s in path %s\n", - dp.hostname, pathname)); - return False; - } + if (!is_myname_or_ipaddr(dp.hostname)) { + DEBUG(3, ("get_referred_path: Invalid hostname %s in path %s\n", + dp.hostname, pathname)); + return False; } pstrcpy(jucn->service_name, dp.servicename); @@ -890,13 +887,10 @@ BOOL create_junction(char *pathname, struct junction_map *jucn) parse_dfs_path(pathname,&dp); /* check if path is dfs : validate first token */ - if ( !strequal(get_local_machine_name(),dp.hostname) ) { - /* Hostname mismatch, check if one of our IP addresses */ - if (!ismyip(*interpret_addr2(dp.hostname))) { - DEBUG(4,("create_junction: Invalid hostname %s in dfs path %s\n", - dp.hostname, pathname)); - return False; - } + if (!is_myname_or_ipaddr(dp.hostname)) { + DEBUG(4,("create_junction: Invalid hostname %s in dfs path %s\n", + dp.hostname, pathname)); + return False; } /* Check for a non-DFS share */ |