mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
Ensure we don't try the open_file_fchmod() if we can't write to the file.
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
parent
a91aac4a5f
commit
77e3099483
@ -856,6 +856,11 @@ int file_set_dosmode(connection_struct *conn, struct smb_filename *smb_fname,
|
|||||||
bits on a file. Just like file_ntimes below.
|
bits on a file. Just like file_ntimes below.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (!can_write_to_file(conn, smb_fname)) {
|
||||||
|
errno = EACCES;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We need to open the file with write access whilst
|
* We need to open the file with write access whilst
|
||||||
* still in our current user context. This ensures we
|
* still in our current user context. This ensures we
|
||||||
|
Loading…
Reference in New Issue
Block a user