]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Use fsp_is_alternate_stream()
authorVolker Lendecke <vl@samba.org>
Sat, 13 Sep 2025 09:54:35 +0000 (11:54 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 21 Oct 2025 17:33:29 +0000 (17:33 +0000)
This is more descriptive than just checking fsp->base_fsp

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/smb2_trans2.c

index 6e8da40794df2b2a43264cc256fe666c7982dacf..c35a2122bbe605fb92ab2a695e842892ea3df833 100644 (file)
@@ -4474,8 +4474,8 @@ static NTSTATUS smb2_file_link_information(connection_struct *conn,
                return status;
        }
 
-       if (fsp->base_fsp) {
-               /* No stream names. */
+       if (fsp_is_alternate_stream(fsp)) {
+               /* No hardlink on streams. */
                return NT_STATUS_NOT_SUPPORTED;
        }
 
@@ -4577,8 +4577,8 @@ static NTSTATUS smb_file_link_information(connection_struct *conn,
                return status;
        }
 
-       if (fsp->base_fsp) {
-               /* No stream names. */
+       if (fsp_is_alternate_stream(fsp)) {
+               /* No hardlink on streams. */
                return NT_STATUS_NOT_SUPPORTED;
        }
 
@@ -4665,7 +4665,7 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn,
                return NT_STATUS_NOT_SUPPORTED;
        }
 
-       if (fsp->base_fsp) {
+       if (fsp_is_alternate_stream(fsp)) {
                /* newname must be a stream name. */
                if (newname[0] != ':') {
                        return NT_STATUS_NOT_SUPPORTED;