From 88e56a71c659d2fb51edcce335ca45acd33dbee4 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 12 Jul 2021 16:40:08 -0700 Subject: [PATCH] s3: smbd: Pass dirfsp, atname down to mode_fn() passed to smbd_dirptr_get_entry(). Not yet used. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- source3/smbd/dir.c | 12 +++++++++++- source3/smbd/globals.h | 2 ++ source3/smbd/trans2.c | 2 ++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 9d8ad01f3b0..127e4b0d08d 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -745,6 +745,8 @@ bool smbd_dirptr_get_entry(TALLOC_CTX *ctx, char **_fname), bool (*mode_fn)(TALLOC_CTX *ctx, void *private_data, + struct files_struct *dirfsp, + struct smb_filename *atname, struct smb_filename *smb_fname, bool get_dosmode, uint32_t *_mode), @@ -944,7 +946,13 @@ bool smbd_dirptr_get_entry(TALLOC_CTX *ctx, continue; } - ok = mode_fn(ctx, private_data, smb_fname, get_dosmode, &mode); + ok = mode_fn(ctx, + private_data, + dirptr->dir_hnd->fsp, + atname, + smb_fname, + get_dosmode, + &mode); if (!ok) { TALLOC_FREE(atname); TALLOC_FREE(smb_fname); @@ -1092,6 +1100,8 @@ static bool smbd_dirptr_8_3_match_fn(TALLOC_CTX *ctx, static bool smbd_dirptr_8_3_mode_fn(TALLOC_CTX *ctx, void *private_data, + struct files_struct *dirfsp, + struct smb_filename *atname, struct smb_filename *smb_fname, bool get_dosmode, uint32_t *_mode) diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h index 2d86201e324..e1a520c1977 100644 --- a/source3/smbd/globals.h +++ b/source3/smbd/globals.h @@ -179,6 +179,8 @@ bool smbd_dirptr_get_entry(TALLOC_CTX *ctx, char **_fname), bool (*mode_fn)(TALLOC_CTX *ctx, void *private_data, + struct files_struct *dirfsp, + struct smb_filename *atname, struct smb_filename *smb_fname, bool get_dosmode, uint32_t *_mode), diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 835f4872857..27f6b4aa352 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -1680,6 +1680,8 @@ static bool smbd_dirptr_lanman2_match_fn(TALLOC_CTX *ctx, static bool smbd_dirptr_lanman2_mode_fn(TALLOC_CTX *ctx, void *private_data, + struct files_struct *dirfsp, + struct smb_filename *atname, struct smb_filename *smb_fname, bool get_dosmode, uint32_t *_mode)