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 19b7675a54..cd7a1fdca1 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -706,6 +706,11 @@ int file_set_dosmode(connection_struct *conn, struct smb_filename *smb_fname, uint32_t old_mode; struct timespec new_create_timespec; + if (!CAN_WRITE(conn)) { + errno = EROFS; + return -1; + } + /* We only allow READONLY|HIDDEN|SYSTEM|DIRECTORY|ARCHIVE here. */ dosmode &= (SAMBA_ATTRIBUTES_MASK | FILE_ATTRIBUTE_OFFLINE); |