summaryrefslogtreecommitdiff
path: root/source3/smbd/open.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/open.c')
-rw-r--r--source3/smbd/open.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 6d7b634bbb..db4831d3d2 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1486,7 +1486,10 @@ static NTSTATUS smbd_calculate_maximum_allowed_access(
if (get_current_uid(conn) == (uid_t)0) {
*p_access_mask |= FILE_GENERIC_ALL;
- } else if (file_existed) {
+ return NT_STATUS_OK;
+ }
+
+ if (file_existed) {
struct security_descriptor *sd;
uint32_t access_granted = 0;
@@ -1523,9 +1526,10 @@ static NTSTATUS smbd_calculate_maximum_allowed_access(
}
*p_access_mask = (access_granted | FILE_READ_ATTRIBUTES);
- } else {
- *p_access_mask = FILE_GENERIC_ALL;
+ return NT_STATUS_OK;
}
+
+ *p_access_mask = FILE_GENERIC_ALL;
return NT_STATUS_OK;
}