summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2020-06-07 16:42:50 +0200
committerJeremy Allison <jra@samba.org>2020-07-18 05:58:40 +0000
commit6ab75d2c629969f1b654c7228eb7fb050eeb615d (patch)
tree8fcc1c204fa1ae945b2a840721775d6da7e2bf75
parent916ebade769a55eb6d87bf9078533e41d3497683 (diff)
downloadsamba-6ab75d2c629969f1b654c7228eb7fb050eeb615d.tar.gz
smbd: use a helper variable in open_file()
No change in behaviour, this just prepares for changes to come. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--source3/smbd/open.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index a7f81a380d4..e8314fa0a3a 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1221,6 +1221,7 @@ static NTSTATUS open_file(files_struct *fsp,
READ_CONTROL_ACCESS;
bool creating = !file_existed && (flags & O_CREAT);
bool truncating = (flags & O_TRUNC);
+ bool open_fd = false;
fsp->fh->fd = -1;
errno = EPERM;
@@ -1273,6 +1274,10 @@ static NTSTATUS open_file(files_struct *fsp,
}
if ((open_access_mask & need_fd_mask) || creating || truncating) {
+ open_fd = true;
+ }
+
+ if (open_fd) {
const char *wild;
int ret;