summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/dfs.c21
-rw-r--r--source3/smbd/trans2.c2
2 files changed, 15 insertions, 8 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;
}
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 7cfe291c0d..f324b658b9 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -2135,7 +2135,7 @@ static int call_trans2getdfsreferral(connection_struct *conn,
/*
reply.server_function=rtp.type;
*/
- reply.server_function=1;
+ reply.server_function=0x3;
/* write the header */
#ifdef UNICODE_DFS