summaryrefslogtreecommitdiff
path: root/source3/smbd/dfs.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-07-15 17:52:44 +0000
committerLuke Leighton <lkcl@samba.org>1999-07-15 17:52:44 +0000
commit2b354d7330785337558a678f2b2484691ad7f2eb (patch)
treee0c4dad0e0ceddf31ba27958ae0b0c86604332af /source3/smbd/dfs.c
parent92b8937bae9139e3f7464b8cba445e929c802381 (diff)
downloadsamba-2b354d7330785337558a678f2b2484691ad7f2eb.tar.gz
samba-2b354d7330785337558a678f2b2484691ad7f2eb.tar.bz2
samba-2b354d7330785337558a678f2b2484691ad7f2eb.zip
dfs issues
(This used to be commit d9ada8b55d539e555d25298e0a308ea952e2807e)
Diffstat (limited to 'source3/smbd/dfs.c')
-rw-r--r--source3/smbd/dfs.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/source3/smbd/dfs.c b/source3/smbd/dfs.c
index baae960538..ca45d89b37 100644
--- a/source3/smbd/dfs.c
+++ b/source3/smbd/dfs.c
@@ -184,14 +184,21 @@ int under_dfs(connection_struct *conn, const char *path)
dfs_internal_table *list=dfs_struct.table;
snum=SNUM(conn);
- snprintf(fullpath, sizeof(fullpath), "\\%s\\%s\\%s", global_myname,
- lp_servicename(snum), path);
+ if (path[0] != '\\')
+ {
+ snprintf(fullpath, sizeof(fullpath), "\\%s\\%s\\%s",
+ global_myname, lp_servicename(snum), path);
+ }
+ else
+ {
+ safe_strcpy(fullpath, path, sizeof(fullpath));
+ }
strupper(fullpath);
path_len=strlen(fullpath);
- DEBUG(0,("looking for: [%s]\n", fullpath));
+ DEBUG(2,("DFS looking for: [%s]\n", fullpath));
for(i=0; i<dfs_struct.size; i++)
{
file_len=list[i].localpath_length;
@@ -199,16 +206,16 @@ int under_dfs(connection_struct *conn, const char *path)
DEBUG(6,("checking against [%s][%d]\n", list[i].localpath,i));
- if(file_len==path_len && !strncasecmp(list[i].localpath, fullpath, file_len))
+ if(file_len==path_len && !StrnCaseCmp(list[i].localpath, fullpath, file_len))
{
- DEBUG(0,("found one linked to [%s]\n", list[i].sharename));
+ DEBUG(2,("found one linked to [%s]\n", list[i].sharename));
ok=True;
break;
}
- if(mangled_len==path_len && !strncasecmp(list[i].mangledpath, fullpath, mangled_len))
+ if(mangled_len==path_len && !StrnCaseCmp(list[i].mangledpath, fullpath, mangled_len))
{
- DEBUG(0,("found one mangled linked to [%s]\n", list[i].sharename));
+ DEBUG(2,("found one mangled linked to [%s]\n", list[i].sharename));
ok=True;
break;
}