smbd: Make find_share_mode_lease() static
[kai/samba-autobuild/.git] / source3 / smbd / proto.h
index eb35a94862ac82b249527d5a3475a4c0526d47ca..a5c55c6ec502069d1144dd823c73fc394bcba048 100644 (file)
@@ -542,7 +542,9 @@ void change_notify_reply(struct smb_request *req,
 void notify_callback(struct smbd_server_connection *sconn,
                     void *private_data, struct timespec when,
                     const struct notify_event *e);
-NTSTATUS change_notify_create(struct files_struct *fsp, uint32_t filter,
+NTSTATUS change_notify_create(struct files_struct *fsp,
+                             uint32_t max_buffer_size,
+                             uint32_t filter,
                              bool recursive);
 NTSTATUS change_notify_add_request(struct smb_request *req,
                                uint32_t max_param,
@@ -689,13 +691,16 @@ void msg_file_was_renamed(struct messaging_context *msg,
                          uint32_t msg_type,
                          struct server_id server_id,
                          DATA_BLOB *data);
-int find_share_mode_lease(struct share_mode_data *d,
-                         const struct GUID *client_guid,
-                         const struct smb2_lease_key *key);
 struct share_mode_lease;
-struct fsp_lease *find_fsp_lease(files_struct *new_fsp,
+NTSTATUS update_share_mode_lease_from_db(
+       struct share_mode_data *d,
+       const struct GUID *client_guid,
+       const struct smb2_lease_key *lease_key);
+struct fsp_lease *find_fsp_lease(struct files_struct *new_fsp,
                                 const struct smb2_lease_key *key,
-                                const struct share_mode_lease *l);
+                                uint32_t current_state,
+                                uint16_t lease_version,
+                                uint16_t lease_epoch);
 NTSTATUS create_file_default(connection_struct *conn,
                             struct smb_request *req,
                             uint16_t root_dir_fid,
@@ -1211,12 +1216,6 @@ void reply_transs2(struct smb_request *req);
 
 /* The following definitions come from smbd/uid.c  */
 
-#define smbd_impersonate_debug_create(main_ev, name, dbg_lvl) \
-       _smbd_impersonate_debug_create(main_ev, name, dbg_lvl, __location__)
-struct tevent_context *_smbd_impersonate_debug_create(struct tevent_context *main_ev,
-                                                     const char *name,
-                                                     int dbg_lvl,
-                                                     const char *location);
 bool change_to_guest(void);
 NTSTATUS check_user_share_access(connection_struct *conn,
                                const struct auth_session_info *session_info,
@@ -1231,8 +1230,6 @@ void become_root(void);
 void unbecome_root(void);
 void smbd_become_root(void);
 void smbd_unbecome_root(void);
-bool become_guest(void);
-void unbecome_guest(void);
 bool become_user(connection_struct *conn, uint64_t vuid);
 bool become_user_by_fsp(struct files_struct *fsp);
 bool become_user_by_session(connection_struct *conn,
@@ -1244,17 +1241,6 @@ const struct security_unix_token *get_current_utok(connection_struct *conn);
 const struct security_token *get_current_nttok(connection_struct *conn);
 uint64_t get_current_vuid(connection_struct *conn);
 
-struct tevent_context *smbd_impersonate_conn_vuid_create(
-                               struct tevent_context *main_ev,
-                               struct connection_struct *conn,
-                               uint64_t vuid);
-struct tevent_context *smbd_impersonate_conn_sess_create(
-                               struct tevent_context *main_ev,
-                               struct connection_struct *conn,
-                               struct auth_session_info *session_info);
-struct tevent_context *smbd_impersonate_root_create(struct tevent_context *main_ev);
-struct tevent_context *smbd_impersonate_guest_create(struct tevent_context *main_ev);
-
 /* The following definitions come from smbd/utmp.c  */
 
 void sys_utmp_claim(const char *username, const char *hostname,