*/
/* in SMB2 mode always return NT_STATUS_LOCK_NOT_GRANTED! */
- if (lock->ntvfs->ctx->protocol == PROTOCOL_SMB2) {
+ if (lock->ntvfs->ctx->protocol >= PROTOCOL_SMB2_02) {
return NT_STATUS_LOCK_NOT_GRANTED;
}
bool allow_delete = false;
/* on SMB2 a blank access mask is always denied */
- if (pvfs->ntvfs->ctx->protocol == PROTOCOL_SMB2 &&
+ if (pvfs->ntvfs->ctx->protocol >= PROTOCOL_SMB2_02 &&
*access_mask == 0) {
return NT_STATUS_ACCESS_DENIED;
}
name->dos.alloc_size = pvfs_round_alloc_size(pvfs, name->st.st_size);
name->dos.nlink = name->st.st_nlink;
name->dos.ea_size = 4;
- if (pvfs->ntvfs->ctx->protocol == PROTOCOL_SMB2) {
+ if (pvfs->ntvfs->ctx->protocol >= PROTOCOL_SMB2_02) {
/* SMB2 represents a null EA with zero bytes */
name->dos.ea_size = 0;
}
}
/* what does this bit really mean?? */
- if (req->ctx->protocol == PROTOCOL_SMB2 &&
+ if (req->ctx->protocol >= PROTOCOL_SMB2_02 &&
access_mask == SEC_STD_SYNCHRONIZE) {
return NT_STATUS_ACCESS_DENIED;
}
* on existing files
*/
if (create_options & NTCREATEX_OPTIONS_DELETE_ON_CLOSE &&
- req->ctx->protocol == PROTOCOL_SMB2) {
+ req->ctx->protocol >= PROTOCOL_SMB2_02) {
del_on_close = true;
} else {
del_on_close = false;
case RAW_FILEINFO_NAME_INFO:
case RAW_FILEINFO_NAME_INFORMATION:
- if (req->ctx->protocol == PROTOCOL_SMB2) {
+ if (req->ctx->protocol >= PROTOCOL_SMB2_02) {
/* strange that SMB2 doesn't have this */
return NT_STATUS_NOT_SUPPORTED;
}
}
/* only SMB2 honors mincnt */
- if (req->ctx->protocol == PROTOCOL_SMB2) {
+ if (req->ctx->protocol >= PROTOCOL_SMB2_02) {
if (rd->readx.in.mincnt > ret ||
(ret == 0 && maxcnt > 0)) {
return NT_STATUS_END_OF_FILE;
}
/* SMB2 doesn't allow a leading slash */
- if (req->ctx->protocol == PROTOCOL_SMB2 &&
+ if (req->ctx->protocol >= PROTOCOL_SMB2_02 &&
*cifs_name == '\\') {
return NT_STATUS_INVALID_PARAMETER;
}
}
/* construct the fully qualified windows name for the new file name */
- if (req->ctx->protocol == PROTOCOL_SMB2) {
+ if (req->ctx->protocol >= PROTOCOL_SMB2_02) {
/* SMB2 sends the full path of the new name */
new_name = talloc_asprintf(req, "\\%s", info->rename_information.in.new_name);
} else {