From: Ralph Boehme Date: Thu, 21 Dec 2023 15:27:42 +0000 (+0100) Subject: smbd: set fsp_flags.is_fsa to true on printer file handles X-Git-Tag: samba-4.18.10~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d87294724e6066870346ff90b16c76fcfd294b9c;p=thirdparty%2Fsamba.git smbd: set fsp_flags.is_fsa to true on printer file handles Printer file handles went through SMB_VFS_CREATE_FILE() and are network callable, so it makes sense to set this on them. This ensures that check_access_fsp() doesn't take the codepath calling smbd_check_access_rights_fsp(), but just checks the request rights from fsp->access_mask. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13688 Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher (cherry picked from commit 76c8fe16bff36a29fa326355256b50737d04bd85) --- diff --git a/source3/printing/printspoolss.c b/source3/printing/printspoolss.c index 31117a4b743..94404f7682a 100644 --- a/source3/printing/printspoolss.c +++ b/source3/printing/printspoolss.c @@ -244,6 +244,7 @@ NTSTATUS print_spool_open(files_struct *fsp, fsp->sent_oplock_break = NO_BREAK_SENT; fsp->fsp_flags.is_directory = false; fsp->fsp_flags.delete_on_close = false; + fsp->fsp_flags.is_fsa = true; fsp->print_file = pf;