From: Ralph Boehme Date: Mon, 18 May 2020 12:30:56 +0000 (+0200) Subject: smbd: set fsp->dirfsp in open_directory() X-Git-Tag: ldb-2.2.0~424 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ca3f13b21d7036be031605da67097474a5d1b3b;p=thirdparty%2Fsamba.git smbd: set fsp->dirfsp in open_directory() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 5ab5ab9551a..b6787b1767b 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -4474,6 +4474,12 @@ static NTSTATUS open_directory(connection_struct *conn, return status; } + if (*dirfsp == fsp->conn->cwd_fsp) { + fsp->dirfsp = fsp->conn->cwd_fsp; + } else { + fsp->dirfsp = talloc_move(fsp, dirfsp); + } + /* Don't store old timestamps for directory handles in the internal database. We don't update them in there if new objects