Skip to content

Commit

Permalink
s3/smbd: sticky write time offset miscalculation causes broken timest…
Browse files Browse the repository at this point in the history
…amps

The offset calculation for the offset that got passed to
fetch_write_time_send() in the enumeration loop was wrong as it passed
the offset before smbd_dirptr_lanman2_entry() added required padding.

This resulted in broken timestamps in the find response.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13024

Signed-off-by: Ralph Boehme <[email protected]>
Reviewed-by: Jeremy Allison <[email protected]>

Autobuild-User(master): Ralph Böhme <[email protected]>
Autobuild-Date(master): Tue Sep 12 02:45:46 CEST 2017 on sn-devel-144
  • Loading branch information
slowfranklin committed Sep 12, 2017
1 parent 87f7d32 commit 7e0b2af
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions source3/smbd/smb2_query_directory.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,6 @@ static struct tevent_req *smbd_smb2_query_directory_send(TALLOC_CTX *mem_ctx,
while (true) {
bool got_exact_match = false;
int space_remaining = in_output_buffer_length - off;
int cur_off = off;
struct file_id file_id;
bool stop = false;

Expand Down Expand Up @@ -556,7 +555,7 @@ static struct tevent_req *smbd_smb2_query_directory_send(TALLOC_CTX *mem_ctx,
conn,
file_id,
info_level,
base_data + cur_off,
base_data + last_entry_off,
&stop);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
Expand Down

0 comments on commit 7e0b2af

Please sign in to comment.