s3:smbd: let conn_clear_vuid_caches() take a uint64_t vuid
[kai/samba.git] / source3 / smbd / proto.h
index 4300ee3bcaa03d33a79f4ad5af04c9654ab2870b..3bd895332076ec13d9a93bc0f1ccb10afff32bac 100644 (file)
@@ -149,9 +149,9 @@ bool conn_snum_used(struct smbd_server_connection *sconn, int snum);
 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,
@@ -369,6 +369,7 @@ NTSTATUS file_new(struct smb_request *req, connection_struct *conn,
 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(
@@ -396,6 +397,7 @@ NTSTATUS fsp_set_smb_fname(struct files_struct *fsp,
 
 /* 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,
@@ -456,7 +458,7 @@ bool is_msdfs_link(connection_struct *conn,
 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);
@@ -471,25 +473,22 @@ bool create_junction(TALLOC_CTX *ctx,
 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  */
 
@@ -497,6 +496,7 @@ void reply_negprot(struct smb_request *req);
 
 /* 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,
@@ -612,16 +612,6 @@ bool open_match_attributes(connection_struct *conn,
                           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,
@@ -663,13 +653,12 @@ NTSTATUS get_relative_fid_filename(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,
@@ -696,16 +685,12 @@ int linux_set_lease_sighandler(int fd);
 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);
@@ -807,7 +792,9 @@ bool smb1_parse_chain(TALLOC_CTX *mem_ctx, const uint8_t *buf,
                      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  */
@@ -997,7 +984,7 @@ int find_service(TALLOC_CTX *ctx, const char *service, char **p_service_out);
 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,
@@ -1009,8 +996,8 @@ void close_cnum(connection_struct *conn, uint16 vuid);
 /* 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  */
@@ -1146,15 +1133,7 @@ void sys_utmp_claim(const char *username, const char *hostname,
 
 /* 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);