struct vfs_init_function_entry;
extern struct vfs_init_function_entry *backends;
extern char *sparse_buf;
-extern char *LastDir;
/* Current number of oplocks we have outstanding. */
extern int32_t exclusive_oplocks_open;
TALLOC_CTX *mem_ctx,
uint16_t info_level,
files_struct *fsp,
- const struct smb_filename *smb_fname,
+ struct smb_filename *smb_fname,
bool delete_pending,
struct timespec write_time_ts,
bool ms_dfs_link,
uint32_t *_mode,
long *_prev_offset);
+bool smbd_dirptr_lanman2_entry(TALLOC_CTX *ctx,
+ connection_struct *conn,
+ struct dptr_struct *dirptr,
+ uint16 flags2,
+ const char *path_mask,
+ uint32 dirtype,
+ int info_level,
+ int requires_resume_key,
+ bool dont_descend,
+ bool ask_sharemode,
+ uint8_t align,
+ bool do_pad,
+ char **ppdata,
+ char *base_data,
+ char *end_data,
+ int space_remaining,
+ bool *out_of_space,
+ bool *got_exact_match,
+ int *_last_entry_off,
+ struct ea_list *name_list);
+
+NTSTATUS smbd_check_open_rights(struct connection_struct *conn,
+ const struct smb_filename *smb_fname,
+ uint32_t access_mask,
+ uint32_t *access_granted);
+
+void smbd_notify_cancel_by_smbreq(struct smbd_server_connection *sconn,
+ const struct smb_request *smbreq);
+
void smbd_server_connection_terminate_ex(struct smbd_server_connection *sconn,
const char *reason,
const char *location);
bool smbd_is_smb2_header(const uint8_t *inbuf, size_t size);
void reply_smb2002(struct smb_request *req, uint16_t choice);
-void smbd_smb2_first_negprot(struct smbd_server_connection *conn,
+void smbd_smb2_first_negprot(struct smbd_server_connection *sconn,
const uint8_t *inbuf, size_t size);
NTSTATUS smbd_smb2_request_error_ex(struct smbd_smb2_request *req,
uint64_t file_id_volatile,
uint8_t oplock_level);
-NTSTATUS smbd_smb2_request_pending_queue(struct smbd_smb2_request *req);
+NTSTATUS smbd_smb2_request_pending_queue(struct smbd_smb2_request *req,
+ struct tevent_req *subreq);
NTSTATUS smbd_smb2_request_check_session(struct smbd_smb2_request *req);
NTSTATUS smbd_smb2_request_check_tcon(struct smbd_smb2_request *req);
TALLOC_CTX *mem_pool;
struct smbd_smb2_request **parent;
- struct smbd_server_connection *conn;
+ struct smbd_server_connection *sconn;
/* the session the request operates on, maybe NULL */
struct smbd_smb2_session *session;
NTSTATUS next_status;
+ /*
+ * The sub request for async backend calls.
+ * This is used for SMB2 Cancel.
+ */
+ struct tevent_req *subreq;
+
struct {
/* the NBT header is not allocated */
uint8_t nbt_hdr[4];
struct smbd_smb2_session {
struct smbd_smb2_session *prev, *next;
- struct smbd_server_connection *conn;
+ struct smbd_server_connection *sconn;
NTSTATUS status;
uint64_t vuid;
AUTH_NTLMSSP_STATE *auth_ntlmssp_state;