summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-09-05 13:11:37 +0200
committerStefan Metzmacher <metze@samba.org>2011-09-05 13:17:34 +0200
commit592ac97728e091e3f126f0c05255255b565c5500 (patch)
tree78605c2cee975d5714c3804ce92ee0e004d529b4
parent1ba5077e5f1db07662f895e068c505479be29b48 (diff)
downloadsamba-592ac97728e091e3f126f0c05255255b565c5500.tar.gz
samba-592ac97728e091e3f126f0c05255255b565c5500.tar.bz2
samba-592ac97728e091e3f126f0c05255255b565c5500.zip
s4:ntvfs: s/!= PROTOCOL_SMB2/< PROTOCOL_SMB2_02/
metze
-rw-r--r--source4/ntvfs/posix/pvfs_acl.c8
-rw-r--r--source4/ntvfs/posix/pvfs_lock.c2
-rw-r--r--source4/ntvfs/posix/pvfs_read.c2
-rw-r--r--source4/ntvfs/posix/pvfs_setfileinfo.c4
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;
}