summaryrefslogtreecommitdiff
path: root/scripts/basic/split-include.c
diff options
context:
space:
mode:
authorPaulo Alcantara <pc@manguebit.org>2026-09-06 14:39:44 -0300
committerPaulo Alcantara <pc@manguebit.org>2026-09-08 11:29:10 -0300
commitcf4d35896621b7298eef51b7a465e5c0cb22f670 (patch)
tree40d9ca53cf3bb649b5688b9619218367cf165a46 /scripts/basic/split-include.c
parent5520e89a5a4f834bced64cf2ac927001cc513a40 (diff)
downloadlinux-cf4d35896621b7298eef51b7a465e5c0cb22f670.tar.gz
linux-cf4d35896621b7298eef51b7a465e5c0cb22f670.zip
smb: client: fix uid/gid override in getattr with posix extensions
When mounting with 'multiuser,posix' options, cifs_getattr() overrides the server-provided uid/gid with the current process's fsuid/fsgid. This is because the condition only checks for unix extensions (tcon->unix_ext) but not posix extensions (tcon->posix_extensions). With SMB3 POSIX extensions, the server provides real uid/gid values just like with unix extensions, so they should be preserved rather than replaced with the caller's credentials. Add a tcon->posix_extensions check to the condition so that uid/gid from the server are properly reported in stat results. Reported-by: Arthur Lesuisse <arthur.lesuisse@ulb.be> Closes: https://lore.kernel.org/r/DB9P190MB2012266F6B8DECBE5D26A1798DB52@DB9P190MB2012.EURP190.PROD.OUTLOOK.COM Suggested-by: Arthur Lesuisse <arthur.lesuisse@ulb.be> Reviewed-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Paulo Alcantara <pc@manguebit.org> Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com> Cc: Shyam Prasad N <sprasad@microsoft.com> Cc: Tom Talpey <tom@talpey.com> Cc: Bharath SM <bharathsm@microsoft.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions