]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Pass dirfsp, atname down to mode_fn() passed to smbd_dirptr_get_entry().
authorJeremy Allison <jra@samba.org>
Mon, 12 Jul 2021 23:40:08 +0000 (16:40 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 14 Jul 2021 08:09:31 +0000 (08:09 +0000)
Not yet used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/dir.c
source3/smbd/globals.h
source3/smbd/trans2.c

index 9d8ad01f3b0d59a8032865915e6176452ab68c26..127e4b0d08daa6a5deba41691bd6984eb74e4469 100644 (file)
@@ -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)
index 2d86201e324c3a6616013346caeccc35c3bab7bb..e1a520c1977be3b279c22aaf218803b239a27fee 100644 (file)
@@ -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),
index 835f487285744957c738d1d28b9485d0338201a1..27f6b4aa35200146c73315d1fac820f91a9dda4c 100644 (file)
@@ -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)