diff options
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/file_access.c | 7 | ||||
-rw-r--r-- | source3/smbd/sesssetup.c | 3 |
2 files changed, 4 insertions, 6 deletions
diff --git a/source3/smbd/file_access.c b/source3/smbd/file_access.c index 84c993d06b..c535bc7fd8 100644 --- a/source3/smbd/file_access.c +++ b/source3/smbd/file_access.c @@ -30,7 +30,6 @@ bool can_access_file_acl(struct connection_struct *conn, const char * fname, uint32_t access_mask) { - bool result; NTSTATUS status; uint32_t access_granted; struct security_descriptor *secdesc = NULL; @@ -45,10 +44,10 @@ bool can_access_file_acl(struct connection_struct *conn, return false; } - result = se_access_check(secdesc, conn->server_info->ptok, - access_mask, &access_granted, &status); + status = se_access_check(secdesc, conn->server_info->ptok, + access_mask, &access_granted); TALLOC_FREE(secdesc); - return result; + return NT_STATUS_IS_OK(status); } /**************************************************************************** diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index a482b3398a..b258386121 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -1447,8 +1447,7 @@ void reply_sesssetup_and_X(struct smb_request *req) remove_from_common_flags2(FLAGS2_32_BIT_ERROR_CODES); if ((passlen1 > MAX_PASS_LEN) - || (passlen1 > smb_bufrem(req->inbuf, - smb_buf(req->inbuf)))) { + || (passlen1 > smb_buflen(req->inbuf))) { reply_nterror(req, nt_status_squash( NT_STATUS_INVALID_PARAMETER)); END_PROFILE(SMBsesssetupX); |