Added "admin_session" method.
[ira/wip.git] / source4 / auth / session.h
index 9b5fba7f39b14693340fef88e4268b91c4464b5f..ca47af33f411d3b338af9858f77fe8de20cd9354 100644 (file)
@@ -1,6 +1,6 @@
 /* 
    Unix SMB/CIFS implementation.
-   Auth session handling
+   Process and provide the logged on user's authorization token
    Copyright (C) Andrew Bartlett   2001
    Copyright (C) Stefan Metzmacher 2005
    
@@ -30,30 +30,41 @@ struct auth_session_info {
 
 #include "librpc/gen_ndr/netlogon.h"
 
-struct auth_session_info *system_session_anon(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx);
+struct tevent_context;
+
+/* Create a security token for a session SYSTEM (the most
+ * trusted/prvilaged account), including the local machine account as
+ * the off-host credentials */
 struct auth_session_info *system_session(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx) ;
+
+/*
+ * Create a system session, but with anonymous credentials (so we do
+ * not need to open secrets.ldb) 
+ */
+struct auth_session_info *system_session_anon(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx);
+
+
 NTSTATUS auth_anonymous_server_info(TALLOC_CTX *mem_ctx, 
                                    const char *netbios_name,
                                    struct auth_serversupplied_info **_server_info) ;
 NTSTATUS auth_generate_session_info(TALLOC_CTX *mem_ctx, 
-                                   struct event_context *event_ctx,
+                                   struct tevent_context *event_ctx,
                                    struct loadparm_context *lp_ctx,
                                    struct auth_serversupplied_info *server_info, 
                                    struct auth_session_info **_session_info) ;
 
-NTSTATUS make_server_info_netlogon_validation(TALLOC_CTX *mem_ctx,
-                                             const char *account_name,
-                                             uint16_t validation_level,
-                                             union netr_Validation *validation,
-                                             struct auth_serversupplied_info **_server_info);
 NTSTATUS auth_anonymous_session_info(TALLOC_CTX *parent_ctx, 
-                                    struct event_context *ev_ctx,
+                                    struct tevent_context *ev_ctx,
                                     struct loadparm_context *lp_ctx,
                                     struct auth_session_info **_session_info);
 
 struct auth_session_info *anonymous_session(TALLOC_CTX *mem_ctx, 
-                                           struct event_context *event_ctx,
+                                           struct tevent_context *event_ctx,
                                            struct loadparm_context *lp_ctx);
 
+struct auth_session_info *admin_session(TALLOC_CTX *mem_ctx,
+                                       struct loadparm_context *lp_ctx,
+                                       struct dom_sid *domain_sid);
+
 
 #endif /* _SAMBA_AUTH_SESSION_H */