char **text_list)
{
auth_methods *list = NULL;
- auth_methods *t = NULL;
+ auth_methods *t, *method = NULL;
NTSTATUS nt_status;
if (!text_list) {
(*auth_context)->auth_method_list = list;
- return nt_status;
+ /* Look for the first module to provide a start_gensec hook, and set that if provided */
+ for (method = (*auth_context)->auth_method_list; method; method = method->next) {
+ if (method->start_gensec) {
+ (*auth_context)->start_gensec = method->start_gensec;
+ break;
+ }
+ }
+ return NT_STATUS_OK;
}
/***************************************************************************
#include "../auth/common_auth.h"
+struct gensec_security;
+
struct extra_auth_info {
struct dom_sid user_sid;
struct dom_sid pgid_sid;
const struct auth_usersupplied_info *user_info,
struct auth_serversupplied_info **server_info);
NTSTATUS (*nt_status_squash)(NTSTATUS nt_status);
+
+ NTSTATUS (*start_gensec)(TALLOC_CTX *mem_ctx, const char *oid_string,
+ struct gensec_security **gensec_context);
};
typedef struct auth_methods
void **my_private_data,
TALLOC_CTX *mem_ctx);
+ /* Optional method allowing this module to provide a way to get a gensec context */
+ NTSTATUS (*start_gensec)(TALLOC_CTX *mem_ctx, const char *oid_string,
+ struct gensec_security **gensec_context);
+
/* Used to keep tabs on things like the cli for SMB server authentication */
void *private_data;