return NT_STATUS_ACCESS_DENIED;
}
- if (pvfs->ntvfs->ctx->protocol != PROTOCOL_SMB2) {
+ if (pvfs->ntvfs->ctx->protocol < PROTOCOL_SMB2_02) {
/* on SMB, this bit is always granted, even if not
asked for */
*access_mask |= SEC_FILE_READ_ATTRIBUTE;
/* expand the generic access bits to file specific bits */
*access_mask = pvfs_translate_mask(*access_mask);
- if (pvfs->ntvfs->ctx->protocol != PROTOCOL_SMB2) {
+ if (pvfs->ntvfs->ctx->protocol < PROTOCOL_SMB2_02) {
*access_mask &= ~SEC_FILE_READ_ATTRIBUTE;
}
status = se_access_check(sd, token, *access_mask, access_mask);
talloc_free(acl);
done:
- if (pvfs->ntvfs->ctx->protocol != PROTOCOL_SMB2) {
+ if (pvfs->ntvfs->ctx->protocol < PROTOCOL_SMB2_02) {
/* on SMB, this bit is always granted, even if not
asked for */
*access_mask |= SEC_FILE_READ_ATTRIBUTE;
*access_mask &= ~SEC_FLAG_MAXIMUM_ALLOWED;
}
- if (pvfs->ntvfs->ctx->protocol != PROTOCOL_SMB2) {
+ if (pvfs->ntvfs->ctx->protocol < PROTOCOL_SMB2_02) {
/* on SMB, this bit is always granted, even if not
asked for */
*access_mask |= SEC_FILE_READ_ATTRIBUTE;
/* we don't retry on a cancel */
if (reason == PVFS_WAIT_CANCEL) {
- if (pvfs->ntvfs->ctx->protocol != PROTOCOL_SMB2) {
+ if (pvfs->ntvfs->ctx->protocol < PROTOCOL_SMB2_02) {
status = NT_STATUS_FILE_LOCK_CONFLICT;
} else {
status = NT_STATUS_CANCELLED;
}
maxcnt = rd->readx.in.maxcnt;
- if (maxcnt > 2*UINT16_MAX && req->ctx->protocol < PROTOCOL_SMB2) {
+ if (maxcnt > 2*UINT16_MAX && req->ctx->protocol < PROTOCOL_SMB2_02) {
DEBUG(3,(__location__ ": Invalid SMB maxcnt 0x%x\n", maxcnt));
return NT_STATUS_INVALID_PARAMETER;
}
/* renames are only allowed within a directory */
if (strchr_m(info->rename_information.in.new_name, '\\') &&
- (req->ctx->protocol != PROTOCOL_SMB2)) {
+ (req->ctx->protocol < PROTOCOL_SMB2_02)) {
return NT_STATUS_NOT_SUPPORTED;
}
/* w2k3 does not appear to allow relative rename. On SMB2, vista sends it sometimes,
but I suspect it is just uninitialised memory */
if (info->rename_information.in.root_fid != 0 &&
- (req->ctx->protocol != PROTOCOL_SMB2)) {
+ (req->ctx->protocol < PROTOCOL_SMB2_02)) {
return NT_STATUS_INVALID_PARAMETER;
}