diff options
author | Andrew Tridgell <tridge@samba.org> | 2008-05-22 23:00:08 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2008-05-22 23:00:08 +1000 |
commit | ac185ae0c5bca7fdf82e90a7d925c77e9cbe1888 (patch) | |
tree | 27f39d6aa5a92c98a44dc0160122a54466b7ee45 /source4/ntvfs/posix | |
parent | 1ea0466289d782a52192a15c519237f7fdbe7a55 (diff) | |
download | samba-ac185ae0c5bca7fdf82e90a7d925c77e9cbe1888.tar.gz samba-ac185ae0c5bca7fdf82e90a7d925c77e9cbe1888.tar.bz2 samba-ac185ae0c5bca7fdf82e90a7d925c77e9cbe1888.zip |
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)
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r-- | source4/ntvfs/posix/pvfs_qfileinfo.c | 13 |
1 files changed, 12 insertions, 1 deletions
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; } |