diff options
author | Shirish Kalele <kalele@samba.org> | 2002-12-27 20:08:35 +0000 |
---|---|---|
committer | Shirish Kalele <kalele@samba.org> | 2002-12-27 20:08:35 +0000 |
commit | 514f548b183b73e1970989d47fb9e6a87e440748 (patch) | |
tree | ea91882da7f76b7a04730fc72404d6e3c118c481 /source/msdfs | |
parent | 28d0601630694f126c58501684ad75939a0647de (diff) | |
download | samba-514f548b183b73e1970989d47fb9e6a87e440748.tar.gz samba-514f548b183b73e1970989d47fb9e6a87e440748.tar.xz samba-514f548b183b73e1970989d47fb9e6a87e440748.zip |
Add msdfs proxy functionality; a CIFS share can directly be a stand-in for
another share, and when clients connect to the first share, they will be
redirected to the proxied share.
Diffstat (limited to 'source/msdfs')
-rw-r--r-- | source/msdfs/msdfs.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/source/msdfs/msdfs.c b/source/msdfs/msdfs.c index 3e66c1c10ca..ef7a4720111 100644 --- a/source/msdfs/msdfs.c +++ b/source/msdfs/msdfs.c @@ -381,6 +381,26 @@ BOOL get_referred_path(char *pathname, struct junction_map* jn, return False; } + if (*lp_msdfs_proxy(snum) != '\0') { + struct referral* ref; + jn->referral_count = 1; + if ((ref = (struct referral*) malloc(sizeof(struct referral))) + == NULL) { + DEBUG(0, ("malloc failed for referral\n")); + return False; + } + + pstrcpy(ref->alternate_path, lp_msdfs_proxy(snum)); + if (dp.reqpath[0] != '\0') + pstrcat(ref->alternate_path, dp.reqpath); + ref->proximity = 0; + ref->ttl = REFERRAL_TTL; + jn->referral_list = ref; + if (consumedcntp) + *consumedcntp = strlen(pathname); + return True; + } + /* If not remote & not a self referral, return False */ if (!resolve_dfs_path(pathname, &dp, conn, False, &jn->referral_list, &jn->referral_count, @@ -630,7 +650,7 @@ int setup_dfs_referral(char* pathname, int max_referral_level, char** ppdata) dbgtext(".\n"); } } - + /* create the referral depeding on version */ DEBUG(10,("max_referral_level :%d\n",max_referral_level)); if(max_referral_level<2 || max_referral_level>3) |