From f407a86b743937d51192bc23917d4c819a9b722a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 15 Jun 2018 18:40:11 +0200 Subject: [PATCH] smbd: let create_conn_struct_as_root() fill in conn->origpath Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- source3/smbd/msdfs.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c index a143e6d23ca..59ef628322a 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -357,6 +357,13 @@ static NTSTATUS create_conn_struct_as_root(TALLOC_CTX *ctx, return NT_STATUS_UNSUCCESSFUL; } + talloc_free(conn->origpath); + conn->origpath = talloc_strdup(conn, conn->connectpath); + if (conn->origpath == NULL) { + conn_free(conn); + return NT_STATUS_NO_MEMORY; + } + conn->fs_capabilities = SMB_VFS_FS_CAPABILITIES(conn, &conn->ts_res); conn->tcon_done = true; *pconn = talloc_move(ctx, &conn);