From 7e77f1fea6c922b76a6961e477a4d72815f08886 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 18 Mar 2019 12:40:06 +0100 Subject: [PATCH] smbd: Focus smb_file_link_information on correct posix'ness In the SMB1 unix extensions, posix'ness is a property of the SMB request, because it's tied to the connection. In the upcoming SMB3 extensions, this will become a property of the file name, it's being set at SMB2_CREATE time. To correctly transfer posix'ness of the filename to the destination name, we can't look at the req->posix_pathnames here, the SMB2_SETINFO call has not set that. This is still correct for SMB1, as the per-connection posix'ness has spilled into the filename there too. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Tue Mar 19 18:46:28 UTC 2019 on sn-devel-144 --- source3/smbd/trans2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index a5750a31e52..dd5973b089b 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -6875,7 +6875,7 @@ static NTSTATUS smb_file_link_information(connection_struct *conn, return NT_STATUS_INVALID_PARAMETER; } - if (req->posix_pathnames) { + if (smb_fname_src->flags & SMB_FILENAME_POSIX_PATH) { srvstr_get_path_posix(ctx, pdata, req->flags2, @@ -6884,6 +6884,7 @@ static NTSTATUS smb_file_link_information(connection_struct *conn, len, STR_TERMINATE, &status); + ucf_flags |= UCF_POSIX_PATHNAMES; } else { srvstr_get_path(ctx, pdata, -- 2.34.1