diff options
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/dosmode.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index 1fb00886f7..4a34947e25 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -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. */ + if (!can_write_to_file(conn, smb_fname)) { + errno = EACCES; + return -1; + } + /* * We need to open the file with write access whilst * still in our current user context. This ensures we |