From aaba2918f8bae15156bce88ef04f821d7e2ea89b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 7 Jun 2021 12:18:13 -0700 Subject: [PATCH] s3: smbd: Cleanup. open_file(). This returns NTSTATUS, don't set errno explicitly internally. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- source3/smbd/open.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/source3/smbd/open.c b/source3/smbd/open.c index bba7dcbad01..ec0757e664b 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -1310,8 +1310,6 @@ static NTSTATUS open_file(files_struct *fsp, bool truncating = (flags & O_TRUNC); bool open_fd = false; - errno = EPERM; - /* Check permissions */ /* @@ -1620,7 +1618,6 @@ static NTSTATUS open_file(files_struct *fsp, if(S_ISDIR(smb_fname->st.st_ex_mode)) { fd_close(fsp); - errno = EISDIR; return NT_STATUS_FILE_IS_A_DIRECTORY; } @@ -1649,7 +1646,6 @@ static NTSTATUS open_file(files_struct *fsp, BOOLSTR(fsp->fsp_flags.can_write), conn->num_files_open)); - errno = 0; return NT_STATUS_OK; } -- 2.47.3