summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-12-30 06:02:54 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:07:44 -0500
commit91190fdad861077d0c33bf85f8fd284f69e3e3fe (patch)
treeb66aed91991bdf4d23ed78512ad296f9ab78da3b /source4/ntvfs/posix
parente913a48ded85e7baf91a355fff46fe270afed936 (diff)
downloadsamba-91190fdad861077d0c33bf85f8fd284f69e3e3fe.tar.gz
samba-91190fdad861077d0c33bf85f8fd284f69e3e3fe.tar.bz2
samba-91190fdad861077d0c33bf85f8fd284f69e3e3fe.zip
r4409: fixed handling of zero access masks for the POSITION_INFORMATION query/set levels
(This used to be commit 75e7229476e1af6ab78fa5b41a7bb67df8e3d2dd)
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r--source4/ntvfs/posix/pvfs_qfileinfo.c2
-rw-r--r--source4/ntvfs/posix/pvfs_setfileinfo.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source4/ntvfs/posix/pvfs_qfileinfo.c b/source4/ntvfs/posix/pvfs_qfileinfo.c
index dae9ca649c..efd95e7674 100644
--- a/source4/ntvfs/posix/pvfs_qfileinfo.c
+++ b/source4/ntvfs/posix/pvfs_qfileinfo.c
@@ -324,7 +324,7 @@ NTSTATUS pvfs_qfileinfo(struct ntvfs_module_context *ntvfs,
h = f->handle;
access_needed = pvfs_fileinfo_access(info->generic.level);
- if (!(f->access_mask & access_needed)) {
+ if ((f->access_mask & access_needed) != access_needed) {
return NT_STATUS_ACCESS_DENIED;
}
diff --git a/source4/ntvfs/posix/pvfs_setfileinfo.c b/source4/ntvfs/posix/pvfs_setfileinfo.c
index 10eb082183..fbc71dc9d4 100644
--- a/source4/ntvfs/posix/pvfs_setfileinfo.c
+++ b/source4/ntvfs/posix/pvfs_setfileinfo.c
@@ -249,7 +249,7 @@ NTSTATUS pvfs_setfileinfo(struct ntvfs_module_context *ntvfs,
h = f->handle;
access_needed = pvfs_setfileinfo_access(info->generic.level);
- if (!(f->access_mask & access_needed)) {
+ if ((f->access_mask & access_needed) != access_needed) {
return NT_STATUS_ACCESS_DENIED;
}