This will be used by the SMB2-CREATE code to request a Persistent Handle from
SMB_VFS_CREATE_FILE().
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
*/
#define NTCREATEX_FLAG_DENY_DOS 0x0001
#define NTCREATEX_FLAG_DENY_FCB 0x0002
+#define NTCREATEX_FLAG_PERSISTENT_OPEN 0x0004
/* Private flag for streams support */
#define NTCREATEX_FLAG_STREAM_BASEOPEN 0x0010
} else {
fsp->fsp_flags.ntcreatex_stream_baseopen = false;
}
+ if (flags & NTCREATEX_FLAG_PERSISTENT_OPEN) {
+ /*
+ * Dereferencing op would crash anyway if NULL, but the assert
+ * makes it more clear that op is expected when getting
+ * NTCREATEX_FLAG_PERSISTENT_OPEN.
+ */
+ SMB_ASSERT(fsp->op);
+ fsp->op->global->persistent = true;
+ }
}