*/
int do_auth_wbclient(rlm_mschap_t const *inst, request_t *request,
uint8_t const *challenge, uint8_t const *response,
- uint8_t nthashhash[NT_DIGEST_LENGTH], mschap_auth_call_env_t *env_data)
+ uint8_t nthashhash[NT_DIGEST_LENGTH], mschap_auth_ctx_t *auth_ctx)
{
int ret = -1;
struct wbcContext *wb_ctx = NULL;
struct wbcAuthUserInfo *info = NULL;
struct wbcAuthErrorInfo *error = NULL;
uint8_t resp[NT_LENGTH];
+ mschap_auth_call_env_t *env_data = auth_ctx->env_data;
/*
* Clear the auth parameters - this is important, as
int do_auth_wbclient(rlm_mschap_t const *inst, request_t *request,
uint8_t const *challenge, uint8_t const *response,
uint8_t nthashhash[NT_DIGEST_LENGTH],
- mschap_auth_call_env_t *env_data);
+ mschap_auth_ctx_t *auth_ctx);
#include <sys/wait.h>
#include "rlm_mschap.h"
-#include "mschap.h"
#include "smbdes.h"
#ifdef WITH_AUTH_WINBIND
MSCHAP_CALL_ENV(autz);
-typedef struct {
- fr_value_box_list_t cpw_user;
- fr_value_box_list_t cpw_domain;
- fr_value_box_list_t local_cpw_result;
- uint8_t new_nt_encrypted[516];
- uint8_t old_nt_hash[NT_DIGEST_LENGTH];
- fr_pair_t *new_hash;
-} mschap_cpw_ctx_t;
-
-typedef struct {
- char const *name;
- rlm_mschap_t const *inst;
- mschap_auth_call_env_t *env_data;
- MSCHAP_AUTH_METHOD method;
- fr_pair_t *nt_password;
- fr_pair_t *smb_ctrl;
- fr_pair_t *cpw;
- mschap_cpw_ctx_t *cpw_ctx;
-} mschap_auth_ctx_t;
-
static fr_dict_t const *dict_freeradius;
static fr_dict_t const *dict_radius;
RCSIDH(rlm_mschap_h, "$Id$")
#include "config.h"
+#include "mschap.h"
#include <freeradius-devel/util/dict.h>
#include <freeradius-devel/server/tmpl.h>
tmpl_t const *ntlm_cpw_domain;
tmpl_t const *local_cpw;
} mschap_auth_call_env_t;
+
+typedef struct {
+ fr_value_box_list_t cpw_user;
+ fr_value_box_list_t cpw_domain;
+ fr_value_box_list_t local_cpw_result;
+ uint8_t new_nt_encrypted[516];
+ uint8_t old_nt_hash[NT_DIGEST_LENGTH];
+ fr_pair_t *new_hash;
+} mschap_cpw_ctx_t;
+
+typedef struct {
+ char const *name;
+ rlm_mschap_t const *inst;
+ mschap_auth_call_env_t *env_data;
+ MSCHAP_AUTH_METHOD method;
+ fr_pair_t *nt_password;
+ fr_pair_t *smb_ctrl;
+ fr_pair_t *cpw;
+ mschap_cpw_ctx_t *cpw_ctx;
+#ifdef WITH_AUTH_WINBIND
+ rlm_mschap_thread_t *t;
+#endif
+} mschap_auth_ctx_t;