summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorShirish Kalele <kalele@samba.org>2002-05-09 18:58:03 +0000
committerShirish Kalele <kalele@samba.org>2002-05-09 18:58:03 +0000
commit909bb7a0551b54a18540b50c5e5159738c76b3c9 (patch)
tree01f5aa1f4bdbd0bbc2bcb8a3d622b74b5f633d0f /source3
parent1bd3da9aef6624325a049cc84a7e6882c072a898 (diff)
downloadsamba-909bb7a0551b54a18540b50c5e5159738c76b3c9.tar.gz
samba-909bb7a0551b54a18540b50c5e5159738c76b3c9.tar.bz2
samba-909bb7a0551b54a18540b50c5e5159738c76b3c9.zip
Allowing %S in dfs root paths. Other variables in standard_sub_advanced won't
resolve correctly in dfs referrals which are done over anonymous IPC$. Also allowing dfs roots to be default services. (This used to be commit 53e91c7a027877184740baf36a6562b57150c1cc)
Diffstat (limited to 'source3')
-rw-r--r--source3/msdfs/msdfs.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/msdfs/msdfs.c b/source3/msdfs/msdfs.c
index e399ad0495..d640496874 100644
--- a/source3/msdfs/msdfs.c
+++ b/source3/msdfs/msdfs.c
@@ -86,6 +86,7 @@ static BOOL create_conn_struct( connection_struct *conn, int snum,
ZERO_STRUCTP(conn);
conn->service = snum;
conn->connectpath = path;
+ pstring_sub(conn->connectpath, "%S", lp_servicename(snum));
if (!smbd_vfs_init(conn)) {
DEBUG(0,("create_conn_struct: smbd_vfs_init failed.\n"));
@@ -365,8 +366,10 @@ BOOL get_referred_path(char *pathname, struct junction_map* jn,
/* Verify the share is a dfs root */
snum = lp_servicenumber(jn->service_name);
- if(snum < 0)
- return False;
+ if(snum < 0) {
+ if ((snum = find_service(jn->service_name)) < 0)
+ return False;
+ }
if (!create_conn_struct(conn, snum, lp_pathname(snum)))
return False;