1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

s3/smbd: add file_id return arg to smbd_dirptr_lanman2_entry

Not used for now, needed for async write_time updates in
smbd_smb2_query_directory_send().

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Ralph Boehme 2016-12-22 14:53:17 +01:00 committed by Jeremy Allison
parent 06891c11d2
commit f589919d67
3 changed files with 11 additions and 3 deletions

View File

@ -206,7 +206,8 @@ NTSTATUS smbd_dirptr_lanman2_entry(TALLOC_CTX *ctx,
int space_remaining,
bool *got_exact_match,
int *_last_entry_off,
struct ea_list *name_list);
struct ea_list *name_list,
struct file_id *file_id);
NTSTATUS smbd_calculate_access_mask(connection_struct *conn,
const struct smb_filename *smb_fname,

View File

@ -478,6 +478,7 @@ static struct tevent_req *smbd_smb2_query_directory_send(TALLOC_CTX *mem_ctx,
space_remaining,
&got_exact_match,
&last_entry_off,
NULL,
NULL);
off = (int)PTR_DIFF(pdata, base_data);

View File

@ -2456,7 +2456,8 @@ NTSTATUS smbd_dirptr_lanman2_entry(TALLOC_CTX *ctx,
int space_remaining,
bool *got_exact_match,
int *_last_entry_off,
struct ea_list *name_list)
struct ea_list *name_list,
struct file_id *file_id)
{
const char *p;
const char *mask = NULL;
@ -2537,6 +2538,11 @@ NTSTATUS smbd_dirptr_lanman2_entry(TALLOC_CTX *ctx,
DEBUG(1,("Conversion error: illegal character: %s\n",
smb_fname_str_dbg(smb_fname)));
}
if (file_id != NULL) {
*file_id = vfs_file_id_from_sbuf(conn, &smb_fname->st);
}
TALLOC_FREE(fname);
TALLOC_FREE(smb_fname);
if (NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES)) {
@ -2584,7 +2590,7 @@ static NTSTATUS get_lanman2_dir_entry(TALLOC_CTX *ctx,
ppdata, base_data, end_data,
space_remaining,
got_exact_match,
last_entry_off, name_list);
last_entry_off, name_list, NULL);
}
/****************************************************************************