/* if we previously had any w bits set then leave them alone
whilst adding in the new w bits, if the new mode is not rdonly */
- if (!IS_DOS_READONLY(dosmode)) {
+ if (!(dosmode & FILE_ATTRIBUTE_READONLY)) {
unixmode |= (smb_fname->st.st_ex_mode & (S_IWUSR|S_IWGRP|S_IWOTH));
}
return NT_STATUS_ACCESS_DENIED;
}
dosattrs = fdos_mode(fsp);
- if (IS_DOS_READONLY(dosattrs)) {
+ if (dosattrs & FILE_ATTRIBUTE_READONLY) {
return NT_STATUS_ACCESS_DENIED;
}
}
}
dosattrs = fdos_mode(fsp);
- if (IS_DOS_READONLY(dosattrs) || !CAN_WRITE(fsp->conn)) {
+ if ((dosattrs & FILE_ATTRIBUTE_READONLY) || !CAN_WRITE(fsp->conn)) {
*p_access_mask &= ~(FILE_GENERIC_WRITE | DELETE_ACCESS);
}
*/
if (((flags & O_ACCMODE) != O_RDONLY) && file_existed &&
- (!CAN_WRITE(conn) || IS_DOS_READONLY(existing_dos_attributes))) {
+ (!CAN_WRITE(conn) ||
+ (existing_dos_attributes & FILE_ATTRIBUTE_READONLY))) {
DEBUG(5,("open_file_ntcreate: write access requested for "
"file %s on read only %s\n",
smb_fname_str_dbg(smb_fname),