#define RESOLVE_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, False, False)) \
- 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, True)) \
+ dfs_redirect(name, conn, False)) \
return ERROR_BOTH(NT_STATUS_PATH_NOT_COVERED, \
ERRSRV, ERRbadpath);; }
#define RESOLVE_DFSPATH_WCARD(name, conn, inbuf, outbuf) \
{ if ((SVAL(inbuf,smb_flg2) & FLAGS2_DFS_PATHNAMES) && \
lp_host_msdfs() && lp_msdfs_root(SNUM(conn)) && \
- dfs_redirect(name,conn, False, True)) \
+ dfs_redirect(name,conn, True)) \
return ERROR_BOTH(NT_STATUS_PATH_NOT_COVERED, \
ERRSRV, ERRbadpath);; }
*****************************************************************/
static BOOL resolve_dfs_path(pstring dfspath, struct dfs_path* dp,
- connection_struct* conn,
- BOOL findfirst_flag, BOOL allow_wcards,
+ connection_struct* conn, BOOL search_flag,
struct referral** reflistpp, int* refcntp,
BOOL* self_referralp, int* consumedcntp)
{
/* check if need to redirect */
if (is_msdfs_link(conn, localpath, reflistpp, refcntp, NULL)) {
- if (findfirst_flag) {
+ if ( search_flag ) {
DEBUG(6,("resolve_dfs_path (FindFirst) No redirection "
"for dfs link %s.\n", dfspath));
return False;
/*****************************************************************
Decides if a dfs pathname should be redirected or not.
If not, the pathname is converted to a tcon-relative local unix path
+
+ search_wcard_flag: this flag performs 2 functions bother related
+ to searches. See resolve_dfs_path() and parse_processed_dfs_path()
+ for details.
*****************************************************************/
-BOOL dfs_redirect( pstring pathname, connection_struct* conn,
- BOOL findfirst_flag, BOOL allow_wcards )
+BOOL dfs_redirect( pstring pathname, connection_struct* conn, BOOL search_wcard_flag )
{
struct dfs_path dp;
if (!conn || !pathname)
return False;
- parse_processed_dfs_path(pathname, &dp, allow_wcards);
+ parse_processed_dfs_path(pathname, &dp, search_wcard_flag);
/* if dfs pathname for a non-dfs share, convert to tcon-relative
path and return false */
if (!strequal(dp.servicename, lp_servicename(SNUM(conn)) ))
return False;
- if (resolve_dfs_path(pathname, &dp, conn, findfirst_flag, allow_wcards,
+ if (resolve_dfs_path(pathname, &dp, conn, search_wcard_flag,
NULL, NULL, NULL, NULL)) {
DEBUG(3,("dfs_redirect: Redirecting %s\n", pathname));
return True;
return False;
/* If not remote & not a self referral, return False */
- if (!resolve_dfs_path(pathname, &dp, conn, False, False,
+ if (!resolve_dfs_path(pathname, &dp, conn, False,
&jucn->referral_list, &jucn->referral_count,
self_referralp, consumedcntp)) {
if (!*self_referralp) {