From: Srinivas Rao V Date: Thu, 3 Jul 2025 14:19:46 +0000 (-0400) Subject: smbd: fix mode being sent to possibly_set_archive X-Git-Tag: tdb-1.4.14~104 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=1d1acebf01902bef3a9ccae23c3be4cacbb777b2;p=thirdparty%2Fsamba.git smbd: fix mode being sent to possibly_set_archive BUG: https://bugzilla.samba.org/show_bug.cgi?id=15880 possibly_set_archive is being passed smb_fname->st.st_ex_mode. Inside the function same variable is getting assigned to itself. Fixed this to send unx_mode to possibly_set_archive. Signed-off-by: Srinivas Rao V Reviewed-by: Ralph Boehme Reviewed-by: Guenther Deschner Autobuild-User(master): Günther Deschner Autobuild-Date(master): Fri Jul 18 22:25:05 UTC 2025 on atb-devel-224 --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 3ffcfa36bb1..e50b6b68fab 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -4255,7 +4255,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, parent_dir_fname, info, new_dos_attributes, - &smb_fname->st.st_ex_mode); + &unx_mode); /* Determine sparse flag. */ if (posix_open) {