]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smdb: use fsp_is_alternate_stream() in open_file()
authorRalph Boehme <slow@samba.org>
Wed, 27 Jul 2022 14:04:24 +0000 (16:04 +0200)
committerJule Anger <janger@samba.org>
Tue, 6 Sep 2022 06:32:13 +0000 (06:32 +0000)
No change in behaviour.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15126
MR: https://gitlab.com/samba-team/samba/-/merge_requests/2643

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 0d3995cec10c5fae8c8b6a1df312062e38437e6f)

source3/smbd/open.c

index 3ab1b92e3fd6c57a93f33bd874ee4e62f0bd4604..fb333ea73fc7f7cec393040e1b51314b8e9171ad 100644 (file)
@@ -1362,7 +1362,7 @@ static NTSTATUS open_file(files_struct *fsp,
 #endif
 
                /* Don't create files with Microsoft wildcard characters. */
-               if (fsp->base_fsp) {
+               if (fsp_is_alternate_stream(fsp)) {
                        /*
                         * wildcard characters are allowed in stream names
                         * only test the basefilename
@@ -1378,7 +1378,7 @@ static NTSTATUS open_file(files_struct *fsp,
                }
 
                /* Can we access this file ? */
-               if (!fsp->base_fsp) {
+               if (!fsp_is_alternate_stream(fsp)) {
                        /* Only do this check on non-stream open. */
                        if (file_existed) {
                                status = smbd_check_access_rights_fsp(