From: Ralph Boehme Date: Thu, 7 May 2020 14:52:20 +0000 (+0200) Subject: smbd: set fsp->dirfsp in create_file_unixpath() X-Git-Tag: ldb-2.2.0~419 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a7ce143bcf8eb368a0c627a973d06f3c0664b68;p=thirdparty%2Fsamba.git smbd: set fsp->dirfsp in create_file_unixpath() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index bb47ebc128d..7e2d1b21187 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -5670,6 +5670,12 @@ static NTSTATUS create_file_unixpath(connection_struct *conn, goto fail; } + if (*dirfsp == fsp->conn->cwd_fsp) { + fsp->dirfsp = fsp->conn->cwd_fsp; + } else { + fsp->dirfsp = talloc_move(fsp, dirfsp); + } + if (base_fsp) { /* * We're opening the stream element of a