mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +03:00
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 e9e711fe37
)
This commit is contained in:
parent
8e1fec05cb
commit
f569db1c06
@ -517,14 +517,11 @@ 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))) {
|
||||
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);
|
||||
pstrcpy(jucn->volume_name, dp.reqpath);
|
||||
@ -890,14 +887,11 @@ 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))) {
|
||||
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 */
|
||||
if(!lp_msdfs_root(lp_servicenumber(dp.servicename))) {
|
||||
|
Loading…
Reference in New Issue
Block a user