From bed11dc99df098704313a1dc15e9d569c1f44ece Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 13 Sep 2025 11:54:35 +0200 Subject: [PATCH] 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 --- source3/smbd/smb2_trans2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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; -- 2.47.3