Subject: [PATCH] s3: vfs: streams_depot. Use conn->connectpath not conn->cwd.

From: Jeremy Allison <[email-masked]>
Date: Fri, 21 Oct 2016 11:04:02 -0700

conn->cwd can change over the life of the connection,
conn->connectpath remains static.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12387

Signed-off-by: Jeremy Allison <[email-masked]>
Reviewed-by: Uri Simchoni <[email-masked]>

Autobuild-User(master): Uri Simchoni <[email-masked]>
Autobuild-Date(master): Mon Oct 24 23:52:48 CEST 2016 on sn-devel-144

(cherry picked from commit 1366385d1c3e9ac0556e954864e60e72f6906942)
---
 source3/modules/vfs_streams_depot.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/source3/modules/vfs_streams_depot.c b/source3/modules/vfs_streams_depot.c
index d874514..aa54b8d 100644
--- a/source3/modules/vfs_streams_depot.c
+++ b/source3/modules/vfs_streams_depot.c
@@ -130,7 +130,8 @@ static char *stream_dir(vfs_handle_struct *handle,
 	check_valid = lp_parm_bool(SNUM(handle->conn),
 		      "streams_depot", "check_valid", true);
 
-	tmp = talloc_asprintf(talloc_tos(), "%s/.streams", handle->conn->cwd);
+	tmp = talloc_asprintf(talloc_tos(), "%s/.streams",
+		handle->conn->connectpath);
 
 	if (tmp == NULL) {
 		errno = ENOMEM;
-- 
2.8.0.rc3.226.g39d4020