mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
s4:ntvfs: s/!= PROTOCOL_SMB2/< PROTOCOL_SMB2_02/
metze
This commit is contained in:
parent
1ba5077e5f
commit
592ac97728
@ -568,7 +568,7 @@ static NTSTATUS pvfs_access_check_unix(struct pvfs_state *pvfs,
|
||||
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;
|
||||
@ -621,7 +621,7 @@ NTSTATUS pvfs_access_check(struct pvfs_state *pvfs,
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
@ -647,7 +647,7 @@ NTSTATUS pvfs_access_check(struct pvfs_state *pvfs,
|
||||
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;
|
||||
@ -745,7 +745,7 @@ NTSTATUS pvfs_access_check_create(struct pvfs_state *pvfs,
|
||||
*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;
|
||||
|
@ -116,7 +116,7 @@ static void pvfs_pending_lock_continue(void *private_data, enum pvfs_wait_notice
|
||||
|
||||
/* 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;
|
||||
|
@ -59,7 +59,7 @@ NTSTATUS pvfs_read(struct ntvfs_module_context *ntvfs,
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ static NTSTATUS pvfs_setfileinfo_rename(struct pvfs_state *pvfs,
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
@ -143,7 +143,7 @@ static NTSTATUS pvfs_setfileinfo_rename(struct pvfs_state *pvfs,
|
||||
/* 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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user