diff options
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r-- | source4/ntvfs/posix/pvfs_acl.c | 8 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_lock.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_read.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_setfileinfo.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c index 78169272e4..cbe3e4e233 100644 --- a/source4/ntvfs/posix/pvfs_acl.c +++ b/source4/ntvfs/posix/pvfs_acl.c @@ -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; diff --git a/source4/ntvfs/posix/pvfs_lock.c b/source4/ntvfs/posix/pvfs_lock.c index 0d99860e59..54c7a33d3a 100644 --- a/source4/ntvfs/posix/pvfs_lock.c +++ b/source4/ntvfs/posix/pvfs_lock.c @@ -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; diff --git a/source4/ntvfs/posix/pvfs_read.c b/source4/ntvfs/posix/pvfs_read.c index 34742fcf66..f60b721e41 100644 --- a/source4/ntvfs/posix/pvfs_read.c +++ b/source4/ntvfs/posix/pvfs_read.c @@ -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; } diff --git a/source4/ntvfs/posix/pvfs_setfileinfo.c b/source4/ntvfs/posix/pvfs_setfileinfo.c index 92fe0148e3..cbb5c7853c 100644 --- a/source4/ntvfs/posix/pvfs_setfileinfo.c +++ b/source4/ntvfs/posix/pvfs_setfileinfo.c @@ -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; } |