diff options
author | Ralph Boehme <slow@samba.org> | 2020-06-13 16:22:20 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2020-07-18 05:58:41 +0000 |
commit | afdeba88194bc1b2ae66dd5e598211801698c189 (patch) | |
tree | dafc21be786b852cd60fcd05552aec74effb6634 /source3/smbd | |
parent | a929644b28c6dc71594c1000cfaeeb0fde094184 (diff) | |
download | samba-afdeba88194bc1b2ae66dd5e598211801698c189.tar.gz |
smbd: check for conn->cwd_fsp in fd_close()
This avoids doing the check in all callers.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/open.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index e8314fa0a3a..5d56804e7e9 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -908,6 +908,10 @@ NTSTATUS fd_close(files_struct *fsp) { int ret; + if (fsp == fsp->conn->cwd_fsp) { + return NT_STATUS_OK; + } + if (fsp->dptr) { dptr_CloseDir(fsp); } |