s4:rpc_server: use a variable for the max total reassembled request payload
[samba.git] / source4 / rpc_server / dcerpc_server.h
index 3d1f5deecb625cf0925b6935f1d26b85c1ac4c7b..54187ee749fb184811cdf17340a6b1a030665d4e 100644 (file)
@@ -135,6 +135,14 @@ struct dcesrv_call_state {
 
        /* this is used by the boilerplate code to generate DCERPC faults */
        uint32_t fault_code;
+
+       /* the reason why we terminate the connection after sending a response */
+       const char *terminate_reason;
+
+       /* temporary auth_info fields */
+       struct dcerpc_auth in_auth_info;
+       struct dcerpc_auth _out_auth_info;
+       struct dcerpc_auth *out_auth_info;
 };
 
 #define DCESRV_HANDLE_ANY 255
@@ -154,18 +162,20 @@ struct dcesrv_auth {
        enum dcerpc_AuthType auth_type;
        enum dcerpc_AuthLevel auth_level;
        uint32_t auth_context_id;
-       struct dcerpc_auth *auth_info;
        struct gensec_security *gensec_security;
        struct auth_session_info *session_info;
        NTSTATUS (*session_key)(struct dcesrv_connection *, DATA_BLOB *session_key);
        bool client_hdr_signing;
        bool hdr_signing;
+       bool auth_finished;
+       bool auth_invalid;
 };
 
 struct dcesrv_connection_context {
        struct dcesrv_connection_context *next, *prev;
        uint32_t context_id;
 
+       /* TODO: remove this legacy (for openchange) in master */
        struct dcesrv_assoc_group *assoc_group;
 
        /* the connection this is on */
@@ -257,6 +267,20 @@ struct dcesrv_connection {
 
        /* the current authentication state */
        struct dcesrv_auth auth_state;
+
+       /*
+        * remember which pdu types are allowed
+        */
+       bool allow_bind;
+       bool allow_auth3;
+       bool allow_alter;
+       bool allow_request;
+
+       /* the association group the connection belongs to */
+       struct dcesrv_assoc_group *assoc_group;
+
+       /* The maximum total payload of reassembled request pdus */
+       size_t max_total_request_size;
 };