smbd: add simple noop smbd_impersonate_{conn_vuid,conn_sess,root,guest}_create()...
[kai/samba-autobuild/.git] / source3 / smbd / proto.h
index f9f29230162c55ce34f8d3a5c955f896b16c2a8d..29121d5c49610972761e254152de79a5a211cae0 100644 (file)
@@ -586,7 +586,6 @@ int fam_watch(TALLOC_CTX *mem_ctx,
 
 struct notify_context *notify_init(
        TALLOC_CTX *mem_ctx, struct messaging_context *msg,
-       struct tevent_context *ev,
        struct smbd_server_connection *sconn,
        void (*callback)(struct smbd_server_connection *sconn,
                         void *, struct timespec,
@@ -1190,6 +1189,12 @@ 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,
@@ -1204,6 +1209,8 @@ 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,
@@ -1215,6 +1222,17 @@ 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,