From ac185ae0c5bca7fdf82e90a7d925c77e9cbe1888 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 22 May 2008 23:00:08 +1000 Subject: fixes for EAs and filename in gentest_smb2 results - SMB2 returns 0 for a null EA - return the share qualified name for the filename in SMB2 ALL_INFO level (This used to be commit f9708184a2037f83ebb97c847414326a42436154) --- source4/ntvfs/posix/pvfs_qfileinfo.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'source4/ntvfs') diff --git a/source4/ntvfs/posix/pvfs_qfileinfo.c b/source4/ntvfs/posix/pvfs_qfileinfo.c index 6bc21e5e3e..102660a0bf 100644 --- a/source4/ntvfs/posix/pvfs_qfileinfo.c +++ b/source4/ntvfs/posix/pvfs_qfileinfo.c @@ -298,10 +298,21 @@ static NTSTATUS pvfs_map_fileinfo(struct pvfs_state *pvfs, (name->dos.attrib & FILE_ATTRIBUTE_DIRECTORY)? 1 : 0; info->all_info2.out.file_id = name->dos.file_id; info->all_info2.out.ea_size = name->dos.ea_size; + if (info->all_info2.out.ea_size == 4) { + /* SMB2 uses zero for a empty EA set */ + info->all_info2.out.ea_size = 0; + } info->all_info2.out.access_mask = 0; /* only set by qfileinfo */ info->all_info2.out.position = 0; /* only set by qfileinfo */ info->all_info2.out.mode = 0; /* only set by qfileinfo */ - info->all_info2.out.fname.s = name->original_name; + /* windows wants the full path on disk for this + result, but I really don't want to expose that on + the wire, so I'll give the path with a share + prefix, which is a good approximation */ + info->all_info2.out.fname.s = talloc_asprintf(req, "\\%s\\%s", + pvfs->share_name, + name->original_name); + NT_STATUS_HAVE_NO_MEMORY(info->all_info2.out.fname.s); return NT_STATUS_OK; } -- cgit