s3-auth rename auth_ntlmssp_state -> auth_generic_state
[mat/samba.git] / source3 / smbd / globals.h
index 472aeee5bbf70e095ed7dea94487abe19e09b391..02527e74536a7143ab75e4ae6fe4445003fc5b75 100644 (file)
@@ -113,14 +113,10 @@ extern int32_t exclusive_oplocks_open;
 extern int32_t level_II_oplocks_open;
 extern struct kernel_oplocks *koplocks;
 
-extern int am_parent;
-extern struct event_context *smbd_event_ctx;
-extern struct messaging_context *smbd_msg_ctx;
+struct smbd_parent_context;
+extern struct smbd_parent_context *am_parent;
 extern struct memcache *smbd_memcache_ctx;
 extern bool exit_firsttime;
-struct child_pid;
-extern struct child_pid *children;
-extern int num_children;
 
 struct tstream_context;
 struct smbd_smb2_request;
@@ -221,10 +217,6 @@ NTSTATUS smbd_calculate_access_mask(connection_struct *conn,
                                    bool file_existed,
                                    uint32_t access_mask,
                                    uint32_t *access_mask_out);
-NTSTATUS smbd_check_open_rights(struct connection_struct *conn,
-                               const struct smb_filename *smb_fname,
-                               uint32_t access_mask,
-                               uint32_t *access_granted);
 
 void smbd_notify_cancel_by_smbreq(const struct smb_request *smbreq);
 
@@ -234,8 +226,6 @@ void smbd_server_connection_terminate_ex(struct smbd_server_connection *sconn,
 #define smbd_server_connection_terminate(sconn, reason) \
        smbd_server_connection_terminate_ex(sconn, reason, __location__)
 
-struct server_id sconn_server_id(const struct smbd_server_connection *sconn);
-
 const char *smb2_opcode_name(uint16_t opcode);
 bool smbd_is_smb2_header(const uint8_t *inbuf, size_t size);
 
@@ -263,7 +253,8 @@ NTSTATUS smbd_smb2_send_oplock_break(struct smbd_server_connection *sconn,
                                     uint8_t oplock_level);
 
 NTSTATUS smbd_smb2_request_pending_queue(struct smbd_smb2_request *req,
-                                        struct tevent_req *subreq);
+                                        struct tevent_req *subreq,
+                                        uint32_t defer_time);
 
 struct smb_request *smbd_smb2_fake_smb_request(struct smbd_smb2_request *req);
 void remove_smb2_chained_fsp(files_struct *fsp);
@@ -343,13 +334,15 @@ struct smbd_smb2_request {
 
        /* the session the request operates on, maybe NULL */
        struct smbd_smb2_session *session;
+       uint64_t last_session_id;
 
        /* the tcon the request operates on, maybe NULL */
        struct smbd_smb2_tcon *tcon;
+       uint32_t last_tid;
 
        int current_idx;
        bool do_signing;
-       bool async;
+       struct tevent_timer *async_te;
        bool cancelled;
        bool compound_related;
 
@@ -418,7 +411,7 @@ struct smbd_smb2_session {
        struct smbd_server_connection *sconn;
        NTSTATUS status;
        uint64_t vuid;
-       struct auth_ntlmssp_state *auth_ntlmssp_state;
+       struct auth_generic_state *auth_ntlmssp_state;
        struct auth_session_info *session_info;
        DATA_BLOB session_key;
        bool do_signing;
@@ -452,6 +445,7 @@ struct smbd_server_connection {
        const struct tsocket_address *local_address;
        const struct tsocket_address *remote_address;
        const char *remote_hostname;
+       struct tevent_context *ev_ctx;
        struct messaging_context *msg_ctx;
        struct {
                bool got_session;
@@ -584,7 +578,6 @@ struct smbd_server_connection {
                } locks;
        } smb1;
        struct {
-               struct tevent_context *event_ctx;
                struct tevent_queue *recv_queue;
                struct tevent_queue *send_queue;
                struct tstream_context *stream;
@@ -619,6 +612,4 @@ struct smbd_server_connection {
 
 extern struct smbd_server_connection *smbd_server_conn;
 
-struct smbd_server_connection *msg_ctx_to_sconn(struct messaging_context *msg_ctx);
-
 void smbd_init_globals(void);