summaryrefslogtreecommitdiff
path: root/source3/smbd/reply.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-04-07 09:21:19 +0200
committerStefan Metzmacher <metze@samba.org>2008-04-07 12:29:30 +0200
commit19f49de92e176495f3e0640502d4a330eacbf59e (patch)
tree61e6a7da0bfdf7ac20bb2bc1ef13a953af331a25 /source3/smbd/reply.c
parent851cadba51b00b326c5f040f23f95932aec53105 (diff)
downloadsamba-19f49de92e176495f3e0640502d4a330eacbf59e.tar.gz
samba-19f49de92e176495f3e0640502d4a330eacbf59e.tar.bz2
samba-19f49de92e176495f3e0640502d4a330eacbf59e.zip
smbd: make it possible to disable get_file_infos() on searches
metze (This used to be commit 404a865a34c3a7c67131b3f99e92c11b2abe3e39)
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r--source3/smbd/reply.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 411eb98ac5..ab77de06f8 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -1224,6 +1224,7 @@ void reply_search(struct smb_request *req)
bool mask_contains_wcard = False;
bool allow_long_path_components = (req->flags2 & FLAGS2_LONG_PATH_COMPONENTS) ? True : False;
TALLOC_CTX *ctx = talloc_tos();
+ bool ask_sharemode = lp_parm_bool(SNUM(conn), "smbd", "search ask sharemode", true);
START_PROFILE(SMBsearch);
@@ -1409,8 +1410,16 @@ void reply_search(struct smb_request *req)
}
for (i=numentries;(i<maxentries) && !finished;i++) {
- finished = !get_dir_entry(ctx,conn,mask,dirtype,&fname,
- &size,&mode,&date,check_descend);
+ finished = !get_dir_entry(ctx,
+ conn,
+ mask,
+ dirtype,
+ &fname,
+ &size,
+ &mode,
+ &date,
+ check_descend,
+ ask_sharemode);
if (!finished) {
char buf[DIR_STRUCT_SIZE];
memcpy(buf,status,21);