#define NTCREATEX_FLAG_DENY_DOS 0x0001
#define NTCREATEX_FLAG_DENY_FCB 0x0002
-/* Private flag for printer support */
-#define NTCREATEX_FLAG_DELETE_ON_CLOSE 0x0008
-
/* Private flag for streams support */
#define NTCREATEX_FLAG_STREAM_BASEOPEN 0x0010
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;
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;
/*
/*
* NT Create options, but we only look at
* NTCREATEX_FLAG_DENY_DOS and
- * NTCREATEX_FLAG_DENY_FCB and
- * NTCREATEX_FLAG_DELETE_ON_CLOSE
- * for print files *only*, where
- * DELETE_ON_CLOSE is not stored in the share
- * mode database.
+ * NTCREATEX_FLAG_DENY_FCB.
*/
uint32_t private_options;
uint64_t gen_id;
* Doing a DELETE_ON_CLOSE should cancel a print job.
*/
if ((info_level == SMB_SET_FILE_DISPOSITION_INFO) && CVAL(pdata,0)) {
- uint32_t new_private_options =
- fh_get_private_options(fsp->fh);
- new_private_options |=
- NTCREATEX_FLAG_DELETE_ON_CLOSE;
- fh_set_private_options(fsp->fh,
- new_private_options);
+
+ fsp->fsp_flags.delete_on_close = true;
DEBUG(3,("call_trans2setfilepathinfo: "
"Cancelling print job (%s)\n",
if ((file_info_level == SMB_SET_FILE_DISPOSITION_INFO)
&& in_input_buffer.length >= 1
&& CVAL(in_input_buffer.data,0)) {
- uint32_t new_private_options =
- fh_get_private_options(fsp->fh);
- new_private_options |= NTCREATEX_FLAG_DELETE_ON_CLOSE;
- fh_set_private_options(fsp->fh, new_private_options);
+ fsp->fsp_flags.delete_on_close = true;
DEBUG(3,("smbd_smb2_setinfo_send: "
"Cancelling print job (%s)\n",