summaryrefslogtreecommitdiff
path: root/source3/smbd/msdfs.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-04-07 22:37:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:31 -0500
commit1253a174f376f575819d0c84e8ee10ac43d18725 (patch)
tree138c32b8e186294e08ae9a05d25150685cc240e2 /source3/smbd/msdfs.c
parentecc6933a86dfc61b49ce907cf444cc45d2e3f8d5 (diff)
downloadsamba-1253a174f376f575819d0c84e8ee10ac43d18725.tar.gz
samba-1253a174f376f575819d0c84e8ee10ac43d18725.tar.bz2
samba-1253a174f376f575819d0c84e8ee10ac43d18725.zip
r6242: after talking to jeremy, we can actually consolidate
the 2 BOOL flags in dfs_redirect() down to one since they both are used in essentially the same context (from what we can tell). Tested Win98SE, WinXP sp 1 & 2, Win2k3 sp1, and WIn2k Sp4. All dfs operations still seem to work. (This used to be commit 59ffacf59c98f2f8277d76ec22712e438fd40618)
Diffstat (limited to 'source3/smbd/msdfs.c')
-rw-r--r--source3/smbd/msdfs.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c
index c5e9d8d21c..b61a328080 100644
--- a/source3/smbd/msdfs.c
+++ b/source3/smbd/msdfs.c
@@ -282,8 +282,7 @@ should try the remaining path on the redirected server.
*****************************************************************/
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)
{
@@ -315,7 +314,7 @@ static BOOL resolve_dfs_path(pstring dfspath, struct dfs_path* dp,
/* 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;
@@ -369,17 +368,20 @@ static BOOL resolve_dfs_path(pstring dfspath, struct dfs_path* dp,
/*****************************************************************
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 */
@@ -391,7 +393,7 @@ BOOL dfs_redirect( pstring pathname, connection_struct* conn,
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;
@@ -529,7 +531,7 @@ BOOL get_referred_path(char *pathname, struct junction_map *jucn,
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) {