summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_search.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-12-18 04:38:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:07:29 -0500
commited42a64901ba0a7ad8cbaac582600688af1b7d72 (patch)
treeb68217a14fbd61d1f58b702d7ecc5b9ee66f2ce5 /source4/ntvfs/posix/pvfs_search.c
parentb02c5abfb470575a67ced192b2913b5a1c73dd3e (diff)
downloadsamba-ed42a64901ba0a7ad8cbaac582600688af1b7d72.tar.gz
samba-ed42a64901ba0a7ad8cbaac582600688af1b7d72.tar.bz2
samba-ed42a64901ba0a7ad8cbaac582600688af1b7d72.zip
r4263: added support for the trans2 RAW_SEARCH_EA_LIST information
level. This is quite a strange level that we've never seen before, but is used by the os2 workplace shell. note w2k screws up this level when unicode is negotiated, so it only passes the RAW-SEARCH test when you force non-unicode (This used to be commit 25189b8fbf6515d573e3398dc9fca56505dc37b9)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_search.c')
-rw-r--r--source4/ntvfs/posix/pvfs_search.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source4/ntvfs/posix/pvfs_search.c b/source4/ntvfs/posix/pvfs_search.c
index c336035218..34f5f2208e 100644
--- a/source4/ntvfs/posix/pvfs_search.c
+++ b/source4/ntvfs/posix/pvfs_search.c
@@ -35,6 +35,8 @@ struct pvfs_search_state {
uint16_t must_attrib;
struct pvfs_dir *dir;
time_t last_used;
+ uint_t num_ea_names;
+ struct ea_name *ea_names;
};
@@ -118,6 +120,20 @@ static NTSTATUS fill_search_info(struct pvfs_state *pvfs,
file->ea_size.name.s = fname;
return NT_STATUS_OK;
+ case RAW_SEARCH_EA_LIST:
+ file->ea_list.resume_key = dir_index;
+ file->ea_list.create_time = nt_time_to_unix(name->dos.create_time);
+ file->ea_list.access_time = nt_time_to_unix(name->dos.access_time);
+ file->ea_list.write_time = nt_time_to_unix(name->dos.write_time);
+ file->ea_list.size = name->st.st_size;
+ file->ea_list.alloc_size = name->dos.alloc_size;
+ file->ea_list.attrib = name->dos.attrib;
+ file->ea_list.name.s = fname;
+ return pvfs_query_ea_list(pvfs, file, name, -1,
+ search->num_ea_names,
+ search->ea_names,
+ &file->ea_list.eas);
+
case RAW_SEARCH_DIRECTORY_INFO:
file->directory_info.file_index = dir_index;
file->directory_info.create_time = name->dos.create_time;
@@ -471,6 +487,8 @@ NTSTATUS pvfs_search_first(struct ntvfs_module_context *ntvfs,
search->search_attrib = search_attrib;
search->must_attrib = 0;
search->last_used = 0;
+ search->num_ea_names = io->t2ffirst.in.num_names;
+ search->ea_names = io->t2ffirst.in.ea_names;
talloc_set_destructor(search, pvfs_search_destructor);
@@ -550,6 +568,9 @@ NTSTATUS pvfs_search_next(struct ntvfs_module_context *ntvfs,
return status;
}
+ search->num_ea_names = io->t2fnext.in.num_names;
+ search->ea_names = io->t2fnext.in.ea_names;
+
status = pvfs_search_fill(pvfs, req, io->t2fnext.in.max_count, search, io->generic.level,
&reply_count, search_private, callback);
if (!NT_STATUS_IS_OK(status)) {