]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: ignore POSIX opens in file_find_subpath()
authorRalph Boehme <slow@samba.org>
Sun, 6 Oct 2024 14:37:47 +0000 (16:37 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 5 Nov 2024 14:39:30 +0000 (14:39 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15608

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/smbd/files.c

index a46ae9385699d34943539e5ddab48872584c4aac..c75d9168fbcb6ec031aad2c8e033916febbbb159 100644 (file)
@@ -2121,7 +2121,8 @@ struct files_struct *file_find_one_fsp_from_lease_key(
 }
 
 /****************************************************************************
- Find any fsp open with a pathname below that of an already open path.
+ Find any fsp open with a pathname below that of an already open path,
+ ignoring POSIX opens.
 ****************************************************************************/
 
 bool file_find_subpath(files_struct *dir_fsp)
@@ -2146,6 +2147,9 @@ bool file_find_subpath(files_struct *dir_fsp)
                if (fsp == dir_fsp) {
                        continue;
                }
+               if (fsp->fsp_flags.posix_open) {
+                       continue;
+               }
 
                d1_fullname = talloc_asprintf(talloc_tos(),
                                        "%s/%s",