From: Volker Lendecke Date: Sat, 13 Sep 2025 09:54:35 +0000 (+0200) Subject: smbd: Use fsp_is_alternate_stream() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bed11dc99df098704313a1dc15e9d569c1f44ece;p=thirdparty%2Fsamba.git smbd: Use fsp_is_alternate_stream() This is more descriptive than just checking fsp->base_fsp Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/smb2_trans2.c b/source3/smbd/smb2_trans2.c index 6e8da40794d..c35a2122bbe 100644 --- a/source3/smbd/smb2_trans2.c +++ b/source3/smbd/smb2_trans2.c @@ -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;