]> 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)
committerVolker Lendecke <vl@samba.org>
Wed, 10 Aug 2022 15:32:35 +0000 (15: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>
source3/smbd/open.c

index f1c2f7382bcff1fdc10d7e0466a8c069793875fd..45b1abb11245e6aa9d24eee4618740e623f8188c 100644 (file)
@@ -1406,7 +1406,7 @@ static NTSTATUS open_file(struct smb_request *req,
 #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
@@ -1422,7 +1422,7 @@ static NTSTATUS open_file(struct smb_request *req,
                }
 
                /* 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(