mirror of
https://github.com/samba-team/samba.git
synced 2025-03-12 20:58:37 +03:00
s3: smbd: Cleanup. open_file(). This returns NTSTATUS, don't set errno explicitly internally.
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
99c02ff6c1
commit
aaba2918f8
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user