From f236c42fb703818a72ddba83a56133f94677c7d6 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 19 May 2022 20:05:52 +0200 Subject: smbd: Remove NTCREATEX_FLAG_DELETE_ON_CLOSE This is only used for print files. Storing it in the fd_handle seems overkill to me, this can easily be stored directly in the fsp itself, we have a flag for this. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/printing/printspoolss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/printing') diff --git a/source3/printing/printspoolss.c b/source3/printing/printspoolss.c index f02f584ad48..31117a4b743 100644 --- a/source3/printing/printspoolss.c +++ b/source3/printing/printspoolss.c @@ -243,6 +243,7 @@ NTSTATUS print_spool_open(files_struct *fsp, fsp->oplock_type = NO_OPLOCK; fsp->sent_oplock_break = NO_BREAK_SENT; fsp->fsp_flags.is_directory = false; + fsp->fsp_flags.delete_on_close = false; fsp->print_file = pf; @@ -319,8 +320,7 @@ void print_spool_end(files_struct *fsp, enum file_close_type close_type) WERROR werr; struct dcerpc_binding_handle *b = NULL; - if (fh_get_private_options(fsp->fh) & - NTCREATEX_FLAG_DELETE_ON_CLOSE) { + if (fsp->fsp_flags.delete_on_close) { int ret; /* -- cgit v1.2.1