diff options
-rw-r--r-- | source4/ntvfs/posix/pvfs_flush.c | 2 | ||||
-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_resolve.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_write.c | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/source4/ntvfs/posix/pvfs_flush.c b/source4/ntvfs/posix/pvfs_flush.c index 66a0cc5edf..5c1132db19 100644 --- a/source4/ntvfs/posix/pvfs_flush.c +++ b/source4/ntvfs/posix/pvfs_flush.c @@ -28,7 +28,7 @@ */ static void pvfs_flush_file(struct pvfs_state *pvfs, struct pvfs_file *f) { - if (f->handle->name->dos.attrib & FILE_ATTRIBUTE_DIRECTORY) { + if (f->handle->fd == -1) { return; } if (pvfs->flags & PVFS_FLAG_STRICT_SYNC) { diff --git a/source4/ntvfs/posix/pvfs_lock.c b/source4/ntvfs/posix/pvfs_lock.c index 485199e6f8..c0d0133f03 100644 --- a/source4/ntvfs/posix/pvfs_lock.c +++ b/source4/ntvfs/posix/pvfs_lock.c @@ -290,7 +290,7 @@ NTSTATUS pvfs_lock(struct ntvfs_module_context *ntvfs, return NT_STATUS_INVALID_HANDLE; } - if (f->handle->name->dos.attrib & FILE_ATTRIBUTE_DIRECTORY) { + if (f->handle->fd == -1) { return NT_STATUS_FILE_IS_A_DIRECTORY; } diff --git a/source4/ntvfs/posix/pvfs_read.c b/source4/ntvfs/posix/pvfs_read.c index 5598ccfb08..0f7d3b4b0c 100644 --- a/source4/ntvfs/posix/pvfs_read.c +++ b/source4/ntvfs/posix/pvfs_read.c @@ -46,7 +46,7 @@ NTSTATUS pvfs_read(struct ntvfs_module_context *ntvfs, return NT_STATUS_INVALID_HANDLE; } - if (f->handle->name->dos.attrib & FILE_ATTRIBUTE_DIRECTORY) { + if (f->handle->fd == -1) { return NT_STATUS_FILE_IS_A_DIRECTORY; } diff --git a/source4/ntvfs/posix/pvfs_resolve.c b/source4/ntvfs/posix/pvfs_resolve.c index 30602b964a..5c650440c3 100644 --- a/source4/ntvfs/posix/pvfs_resolve.c +++ b/source4/ntvfs/posix/pvfs_resolve.c @@ -511,7 +511,7 @@ NTSTATUS pvfs_resolve_name_fd(struct pvfs_state *pvfs, int fd, inode = name->st.st_ino; } - if (name->exists && (name->dos.attrib & FILE_ATTRIBUTE_DIRECTORY)) { + if (fd == -1) { if (stat(name->full_name, &name->st) == -1) { return NT_STATUS_INVALID_HANDLE; } diff --git a/source4/ntvfs/posix/pvfs_write.c b/source4/ntvfs/posix/pvfs_write.c index 6ebd9b70cf..989e8d7b1b 100644 --- a/source4/ntvfs/posix/pvfs_write.c +++ b/source4/ntvfs/posix/pvfs_write.c @@ -44,7 +44,7 @@ NTSTATUS pvfs_write(struct ntvfs_module_context *ntvfs, return NT_STATUS_INVALID_HANDLE; } - if (f->handle->name->dos.attrib & FILE_ATTRIBUTE_DIRECTORY) { + if (f->handle->fd == -1) { return NT_STATUS_FILE_IS_A_DIRECTORY; } |