summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2016-12-22 14:53:17 +0100
committerJeremy Allison <jra@samba.org>2017-04-18 22:54:16 +0200
commitf589919d674185620f07f7910ef1897dc070137a (patch)
tree8e899fcd8c68c42e3827ec310b4f6d180446463f /source3
parent06891c11d2a105d11cf4696002e75e10566b58e0 (diff)
downloadsamba-f589919d674185620f07f7910ef1897dc070137a.tar.gz
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>
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/globals.h3
-rw-r--r--source3/smbd/smb2_query_directory.c1
-rw-r--r--source3/smbd/trans2.c10
3 files changed, 11 insertions, 3 deletions
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index 67d3a892d58..22e364c71f7 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -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,
diff --git a/source3/smbd/smb2_query_directory.c b/source3/smbd/smb2_query_directory.c
index 2af029bc613..dc716426ef3 100644
--- a/source3/smbd/smb2_query_directory.c
+++ b/source3/smbd/smb2_query_directory.c
@@ -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);
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 923fed4ef8e..e8346ba735a 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -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);
}
/****************************************************************************