auth: For NTLM and KDC authentication, log the authentication duration
[samba.git] / source3 / include / auth.h
index acae5a83c6cdbfb6770a1c59cf2ad327d02dd976..0facb8668cd37f5167689acd55230292985ac73d 100644 (file)
@@ -30,13 +30,18 @@ struct extra_auth_info {
 
 struct auth_serversupplied_info {
        bool guest;
-       bool system;
 
        struct security_unix_token utok;
 
-       /* NT group information taken from the info3 structure */
-
-       struct security_token *security_token;
+       /*
+        * A complete auth_session_info
+        *
+        * This is not normally filled in, during the typical
+        * authentication process.  If filled in, it has already been
+        * finalised by a nasty hack to support a cached guest/system
+        * session_info
+        */
+       const struct auth_session_info *cached_session_info;
 
        /* These are the intermediate session keys, as provided by a
         * NETLOGON server and used by NTLMSSP to negotiate key
@@ -79,6 +84,9 @@ typedef NTSTATUS (*make_auth4_context_fn)(const struct auth_context *auth_contex
 struct auth_context {
        DATA_BLOB challenge; 
 
+       /* What time did this start */
+       struct timeval start_time;
+
        /* Who set this up in the first place? */ 
        const char *challenge_set_by; 
 
@@ -107,6 +115,8 @@ typedef struct auth_methods
        /* Used to keep tabs on things like the cli for SMB server authentication */
        void *private_data;
 
+       uint32_t flags;
+
 } auth_methods;
 
 typedef NTSTATUS (*auth_init_function)(struct auth_context *, const char *, struct auth_methods **);
@@ -130,7 +140,9 @@ enum session_key_use_intent {
 
 /* Changed from 1 -> 2 to add the logon_parameters field. */
 /* Changed from 2 -> 3 when we reworked many auth structures to use IDL or be in common with Samba4 */
-#define AUTH_INTERFACE_VERSION 3
+/* Changed from 3 -> 4 when we reworked added the flags */
+/* Changed from 4 -> 5 as module init functions now take a TALLOC_CTX * */
+#define AUTH_INTERFACE_VERSION 5
 
 #include "auth/proto.h"