r4409: fixed handling of zero access masks for the POSITION_INFORMATION query/set...
authorAndrew Tridgell <tridge@samba.org>
Thu, 30 Dec 2004 06:02:54 +0000 (06:02 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:07:44 +0000 (13:07 -0500)
(This used to be commit 75e7229476e1af6ab78fa5b41a7bb67df8e3d2dd)

source4/ntvfs/posix/pvfs_qfileinfo.c
source4/ntvfs/posix/pvfs_setfileinfo.c

index dae9ca649cb3a363f79725b52916ba8a2b829047..efd95e76749794c08debf5e5b8e4c019e7495528 100644 (file)
@@ -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;
        }
 
index 10eb0821838b2f83e9abc3b5b36f44fe3adbd08d..fbc71dc9d4fffdeef801ffbc5212f92f26bf23e6 100644 (file)
@@ -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;
        }