connection_struct *conn_find(struct smbd_server_connection *sconn,
unsigned cnum);
connection_struct *conn_new(struct smbd_server_connection *sconn);
-bool conn_close_all(struct smbd_server_connection *sconn);
+void conn_close_all(struct smbd_server_connection *sconn);
bool conn_idle_all(struct smbd_server_connection *sconn, time_t t);
-void conn_clear_vuid_caches(struct smbd_server_connection *sconn, uint16 vuid);
+void conn_clear_vuid_caches(struct smbd_server_connection *sconn, uint64_t vuid);
void conn_free(connection_struct *conn);
void conn_force_tdis(struct smbd_server_connection *sconn, const char *sharename);
void msg_force_tdis(struct messaging_context *msg,
void file_close_conn(connection_struct *conn);
void file_close_pid(struct smbd_server_connection *sconn, uint16 smbpid,
int vuid);
+bool file_init_global(void);
bool file_init(struct smbd_server_connection *sconn);
void file_close_user(struct smbd_server_connection *sconn, int vuid);
struct files_struct *files_forall(
/* The following definitions come from smbd/ipc.c */
+NTSTATUS nt_status_np_pipe(NTSTATUS status);
void send_trans_reply(connection_struct *conn,
struct smb_request *req,
char *rparam, int rparam_len,
struct junction_map;
NTSTATUS get_referred_path(TALLOC_CTX *ctx,
const char *dfs_path,
- struct smbd_server_connection *sconn,
+ bool allow_broken_path,
struct junction_map *jucn,
int *consumedcntp,
bool *self_referralp);
bool create_msdfs_link(const struct junction_map *jucn);
bool remove_msdfs_link(const struct junction_map *jucn);
struct junction_map *enum_msdfs_links(TALLOC_CTX *ctx, size_t *p_num_jn);
-NTSTATUS resolve_dfspath(TALLOC_CTX *ctx,
- connection_struct *conn,
- bool dfs_pathnames,
- const char *name_in,
- char **pp_name_out);
NTSTATUS resolve_dfspath_wcard(TALLOC_CTX *ctx,
connection_struct *conn,
bool dfs_pathnames,
const char *name_in,
bool allow_wcards,
+ bool allow_broken_path,
char **pp_name_out,
bool *ppath_contains_wcard);
NTSTATUS create_conn_struct(TALLOC_CTX *ctx,
- struct smbd_server_connection *sconn,
- connection_struct **pconn,
- int snum,
- const char *path,
- const struct auth_session_info *session_info,
- char **poldcwd);
+ struct tevent_context *ev,
+ struct messaging_context *msg,
+ connection_struct **pconn,
+ int snum,
+ const char *path,
+ const struct auth_session_info *session_info,
+ char **poldcwd);
/* The following definitions come from smbd/negprot.c */
/* The following definitions come from smbd/notify.c */
+bool change_notify_fsp_has_changes(struct files_struct *fsp);
void change_notify_reply(struct smb_request *req,
NTSTATUS error_code,
uint32_t max_param,
mode_t existing_unx_mode,
mode_t new_unx_mode,
mode_t *returned_unx_mode);
-NTSTATUS fcb_or_dos_open(struct smb_request *req,
- connection_struct *conn,
- files_struct *fsp_to_dup_into,
- const struct smb_filename *smb_fname,
- struct file_id id,
- uint16 file_pid,
- uint16 vuid,
- uint32 access_mask,
- uint32 share_access,
- uint32 create_options);
void remove_deferred_open_entry(struct file_id id, uint64_t mid,
struct server_id pid);
NTSTATUS open_file_fchmod(connection_struct *conn,
/* The following definitions come from smbd/oplock.c */
-int32 get_number_of_exclusive_open_oplocks(void);
void break_kernel_oplock(struct messaging_context *msg_ctx, files_struct *fsp);
bool set_file_oplock(files_struct *fsp, int oplock_type);
void release_file_oplock(files_struct *fsp);
bool remove_oplock(files_struct *fsp);
bool downgrade_oplock(files_struct *fsp);
-bool should_notify_deferred_opens(void);
+bool should_notify_deferred_opens(struct smbd_server_connection *sconn);
void break_level2_to_none_async(files_struct *fsp);
void reply_to_oplock_break_requests(files_struct *fsp);
void contend_level2_oplocks_begin(files_struct *fsp,
int linux_setlease(int fd, int leasetype);
struct kernel_oplocks *linux_init_kernel_oplocks(struct smbd_server_connection *sconn);
-/* The following definitions come from smbd/oplock_onefs.c */
-
-struct kernel_oplocks *onefs_init_kernel_oplocks(struct smbd_server_connection *sconn);
-
/* The following definitions come from smbd/password.c */
-user_struct *get_valid_user_struct(struct smbd_server_connection *sconn,
+struct user_struct *get_valid_user_struct(struct smbd_server_connection *sconn,
uint16 vuid);
bool is_partial_auth_vuid(struct smbd_server_connection *sconn, uint16 vuid);
-user_struct *get_partial_auth_user_struct(struct smbd_server_connection *sconn,
+struct user_struct *get_partial_auth_user_struct(struct smbd_server_connection *sconn,
uint16 vuid);
void invalidate_vuid(struct smbd_server_connection *sconn, uint16 vuid);
void invalidate_all_vuids(struct smbd_server_connection *sconn);
struct smb_request ***reqs, unsigned *num_reqs);
bool req_is_in_chain(struct smb_request *req);
void smbd_process(struct tevent_context *ev_ctx,
- struct smbd_server_connection *sconn);
+ struct messaging_context *msg_ctx,
+ int sock_fd,
+ bool interactive);
bool fork_echo_handler(struct smbd_server_connection *sconn);
/* The following definitions come from smbd/quotas.c */
struct smbd_smb2_tcon;
connection_struct *make_connection_smb2(struct smbd_server_connection *sconn,
struct smbd_smb2_tcon *tcon,
- user_struct *vuser,
+ struct user_struct *vuser,
const char *pdev,
NTSTATUS *pstatus);
connection_struct *make_connection(struct smbd_server_connection *sconn,
/* The following definitions come from smbd/session.c */
struct sessionid;
bool session_init(void);
-bool session_claim(struct smbd_server_connection *sconn, user_struct *vuser);
-void session_yield(user_struct *vuser);
+bool session_claim(struct smbd_server_connection *sconn, struct user_struct *vuser);
+void session_yield(struct user_struct *vuser);
int list_sessions(TALLOC_CTX *mem_ctx, struct sessionid **session_list);
/* The following definitions come from smbd/sesssetup.c */
/* The following definitions come from smbd/vfs.c */
-NTSTATUS smb_register_vfs(int version, const char *name,
- const struct vfs_fn_pointers *fns);
bool vfs_init_custom(connection_struct *conn, const char *vfs_object);
-void *vfs_add_fsp_extension_notype(vfs_handle_struct *handle,
- files_struct *fsp, size_t ext_size,
- void (*destroy_fn)(void *p_data));
-void vfs_remove_fsp_extension(vfs_handle_struct *handle, files_struct *fsp);
-void *vfs_memctx_fsp_extension(vfs_handle_struct *handle, files_struct *fsp);
-void *vfs_fetch_fsp_extension(vfs_handle_struct *handle, files_struct *fsp);
bool smbd_vfs_init(connection_struct *conn);
NTSTATUS vfs_file_exist(connection_struct *conn, struct smb_filename *smb_fname);
ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count);