From 9146f19bb44f00af8b180f8964e1bd8463ec2e73 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sun, 10 Apr 2005 22:19:36 +0000 Subject: r6285: revert -r5707 to fix the XP sp2 dfs issue in FindFirst(). This is not the same fix as in the current SAMBA_3_0 svn tree since that code has morphed quite a lot. But the effect is the same. --- source/include/msdfs.h | 8 ++++++++ source/smbd/trans2.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/source/include/msdfs.h b/source/include/msdfs.h index 8b365d02ea6..afbbe738fe1 100644 --- a/source/include/msdfs.h +++ b/source/include/msdfs.h @@ -72,6 +72,14 @@ struct dfs_path return ERROR_BOTH(NT_STATUS_PATH_NOT_COVERED, \ ERRSRV, ERRbadpath);; } +#define RESOLVE_FINDFIRST_DFSPATH(name, conn, inbuf, outbuf) \ +{ if ((SVAL(inbuf,smb_flg2) & FLAGS2_DFS_PATHNAMES) && \ + lp_host_msdfs() && lp_msdfs_root(SNUM(conn)) && \ + dfs_redirect(name,conn,True)) \ + return ERROR_BOTH(NT_STATUS_PATH_NOT_COVERED, \ + ERRSRV, ERRbadpath);; } + + #define init_dfsroot(conn, inbuf, outbuf) \ { if (lp_msdfs_root(SNUM(conn)) && lp_host_msdfs()) { \ DEBUG(2,("Serving %s as a Dfs root\n", \ diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 05ff7d6785d..daa458f3a97 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -1378,7 +1378,7 @@ close_if_end = %d requires_resume_key = %d level = 0x%x, max_data_bytes = %d\n", return ERROR_NT(ntstatus); } - RESOLVE_DFSPATH(directory, conn, inbuf, outbuf); + RESOLVE_FINDFIRST_DFSPATH(directory, conn, inbuf, outbuf); unix_convert(directory,conn,0,&bad_path,&sbuf); if (bad_path) { -- cgit