summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_qfileinfo.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-11-17 05:58:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:54 -0500
commitae7caf08c1f47f3ad08856cfea2a3e6e956b48ab (patch)
treea70a8867b4d85c5d34a1f30e6aff22cf37052d6f /source4/ntvfs/posix/pvfs_qfileinfo.c
parentca90965a3a2dabfc50be6d155c20004a61f81318 (diff)
downloadsamba-ae7caf08c1f47f3ad08856cfea2a3e6e956b48ab.tar.gz
samba-ae7caf08c1f47f3ad08856cfea2a3e6e956b48ab.tar.bz2
samba-ae7caf08c1f47f3ad08856cfea2a3e6e956b48ab.zip
r3798: added support for alternate data streams in xattrs into pvfs.
The trickiest part about this was getting the sharing and locking rules right, as alternate streams are separate locking spaces from the main file for the purposes of byte range locking, and separate for most share violation rules. I suspect there are still problems with delete on close with alternate data streams. I'll look at that next. (This used to be commit b6452c4a2068cf7e837778559da002ae191b508a)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_qfileinfo.c')
-rw-r--r--source4/ntvfs/posix/pvfs_qfileinfo.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/source4/ntvfs/posix/pvfs_qfileinfo.c b/source4/ntvfs/posix/pvfs_qfileinfo.c
index 3eaa7865e8..3959fbfc16 100644
--- a/source4/ntvfs/posix/pvfs_qfileinfo.c
+++ b/source4/ntvfs/posix/pvfs_qfileinfo.c
@@ -148,17 +148,7 @@ static NTSTATUS pvfs_map_fileinfo(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx,
case RAW_FILEINFO_STREAM_INFO:
case RAW_FILEINFO_STREAM_INFORMATION:
- info->stream_info.out.num_streams = 1;
- info->stream_info.out.streams = talloc_array_p(mem_ctx,
- struct stream_struct, 1);
- if (!info->stream_info.out.streams) {
- return NT_STATUS_NO_MEMORY;
- }
- info->stream_info.out.streams[0].size = name->st.st_size;
- info->stream_info.out.streams[0].alloc_size = name->dos.alloc_size;
- info->stream_info.out.streams[0].stream_name.s =
- talloc_strdup(info->stream_info.out.streams, "::$DATA");
- return NT_STATUS_OK;
+ return pvfs_stream_information(pvfs, mem_ctx, name, fd, &info->stream_info.out);
case RAW_FILEINFO_COMPRESSION_INFO:
case RAW_FILEINFO_COMPRESSION_INFORMATION:
@@ -219,12 +209,12 @@ NTSTATUS pvfs_qpathinfo(struct ntvfs_module_context *ntvfs,
NTSTATUS status;
/* resolve the cifs name to a posix name */
- status = pvfs_resolve_name(pvfs, req, info->generic.in.fname, 0, &name);
+ status = pvfs_resolve_name(pvfs, req, info->generic.in.fname, PVFS_RESOLVE_STREAMS, &name);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
- if (!name->exists) {
+ if (!name->stream_exists) {
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}