/* The following definitions come from smbd/aio.c */
-bool initialize_async_io_handler(void);
+struct aio_extra;
+bool aio_write_through_requested(struct aio_extra *aio_ex);
NTSTATUS schedule_aio_read_and_X(connection_struct *conn,
struct smb_request *req,
files_struct *fsp, off_t startpos,
DATA_BLOB in_data,
bool write_through);
bool cancel_smb2_aio(struct smb_request *smbreq);
-int wait_for_aio_completion(files_struct *fsp);
-void smbd_aio_complete_aio_ex(struct aio_extra *aio_ex);
/* The following definitions come from smbd/blocking.c */
void *private_data);
void trigger_write_time_update(struct files_struct *fsp);
void trigger_write_time_update_immediate(struct files_struct *fsp);
+void mark_file_modified(files_struct *fsp);
ssize_t write_file(struct smb_request *req,
files_struct *fsp,
const char *data,
void fsp_free(files_struct *fsp);
void file_free(struct smb_request *req, files_struct *fsp);
files_struct *file_fsp(struct smb_request *req, uint16 fid);
-uint64_t fsp_persistent_id(const struct files_struct *fsp);
struct files_struct *file_fsp_smb2(struct smbd_smb2_request *smb2req,
uint64_t persistent_id,
uint64_t volatile_id);
/* The following definitions come from smbd/nttrans.c */
void reply_ntcreate_and_X(struct smb_request *req);
-NTSTATUS set_sd(files_struct *fsp, uint8_t *data, uint32_t sd_len,
+NTSTATUS set_sd(files_struct *fsp, struct security_descriptor *psd,
+ uint32_t security_info_sent);
+NTSTATUS set_sd_blob(files_struct *fsp, uint8_t *data, uint32_t sd_len,
uint32_t security_info_sent);
struct ea_list *read_nttrans_ea_list(TALLOC_CTX *ctx, const char *pdata, size_t data_size);
void reply_ntcancel(struct smb_request *req);
NTSTATUS smbd_check_access_rights(struct connection_struct *conn,
const struct smb_filename *smb_fname,
uint32_t access_mask);
+NTSTATUS fd_open(struct connection_struct *conn, files_struct *fsp,
+ int flags, mode_t mode);
NTSTATUS fd_close(files_struct *fsp);
void change_file_owner_to_parent(connection_struct *conn,
const char *inherit_from_dir,
const char *fname,
SMB_STRUCT_STAT *psbuf);
bool is_stat_open(uint32 access_mask);
-bool request_timed_out(struct timeval request_time,
- struct timeval timeout);
-bool open_match_attributes(connection_struct *conn,
- uint32 old_dos_attr,
- uint32 new_dos_attr,
- mode_t existing_unx_mode,
- mode_t new_unx_mode,
- mode_t *returned_unx_mode);
void remove_deferred_open_entry(struct file_id id, uint64_t mid,
struct server_id pid);
+bool is_deferred_open_async(const void *ptr);
NTSTATUS open_file_fchmod(connection_struct *conn,
struct smb_filename *smb_fname,
files_struct **result);
-bool check_same_stat(const SMB_STRUCT_STAT *sbuf1,
- const SMB_STRUCT_STAT *sbuf2);
NTSTATUS create_directory(connection_struct *conn, struct smb_request *req,
struct smb_filename *smb_dname);
void msg_file_was_renamed(struct messaging_context *msg,
struct user_struct *get_valid_user_struct(struct smbd_server_connection *sconn,
uint64_t vuid);
void invalidate_vuid(struct smbd_server_connection *sconn, uint64_t vuid);
-void invalidate_all_vuids(struct smbd_server_connection *sconn);
int register_homes_share(const char *username);
/* The following definitions come from smbd/pipes.c */
const SMB_STRUCT_STAT *psbuf,
uint16 num_def_acls, const char *pdata);
bool set_unix_posix_acl(connection_struct *conn, files_struct *fsp, const char *fname, uint16 num_acls, const char *pdata);
-struct security_descriptor *get_nt_acl_no_snum( TALLOC_CTX *ctx, const char *fname);
+struct security_descriptor *get_nt_acl_no_snum( TALLOC_CTX *ctx, const char *fname, uint32 security_info_wanted);
NTSTATUS make_default_filesystem_acl(TALLOC_CTX *ctx,
const char *name,
SMB_STRUCT_STAT *psbuf,
bool zero);
void remove_deferred_open_message_smb(struct smbd_server_connection *sconn,
uint64_t mid);
-void schedule_deferred_open_message_smb(struct smbd_server_connection *sconn,
+bool schedule_deferred_open_message_smb(struct smbd_server_connection *sconn,
uint64_t mid);
bool open_was_deferred(struct smbd_server_connection *sconn, uint64_t mid);
bool get_deferred_open_message_state(struct smb_request *smbreq,
void load_registry_shares(void);
int add_home_service(const char *service, const char *username, const char *homedir);
int find_service(TALLOC_CTX *ctx, const char *service, char **p_service_out);
-struct smbXsrv_tcon0;
connection_struct *make_connection_smb2(struct smbd_server_connection *sconn,
- struct smbXsrv_tcon0 *tcon,
+ struct smbXsrv_tcon *tcon,
int snum,
struct user_struct *vuser,
const char *pdev,
void *avahi_start_register(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
uint16_t port);
+/* The following definitions come from smbd/smb2_create.c */
+
+NTSTATUS vfs_default_durable_cookie(struct files_struct *fsp,
+ TALLOC_CTX *mem_ctx,
+ DATA_BLOB *cookie_blob);
+NTSTATUS vfs_default_durable_disconnect(struct files_struct *fsp,
+ const DATA_BLOB old_cookie,
+ TALLOC_CTX *mem_ctx,
+ DATA_BLOB *new_cookie);
+NTSTATUS vfs_default_durable_reconnect(struct connection_struct *conn,
+ struct smb_request *smb1req,
+ struct smbXsrv_open *op,
+ const DATA_BLOB old_cookie,
+ TALLOC_CTX *mem_ctx,
+ files_struct **result,
+ DATA_BLOB *new_cookie);
+
#endif /* _SMBD_PROTO_H_ */