The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Macros | Functions
auth_wbclient.c File Reference

NTLM authentication against the wbclient library. More...

#include <freeradius-devel/server/base.h>
#include <freeradius-devel/util/debug.h>
#include <wbclient.h>
#include <core/ntstatus.h>
#include "rlm_mschap.h"
#include "mschap.h"
#include "auth_wbclient.h"
+ Include dependency graph for auth_wbclient.c:

Go to the source code of this file.

Macros

#define NT_LENGTH   24
 
#define WBC_MSV1_0_ALLOW_MSVCHAPV2   0x00010000
 

Functions

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)
 Check NTLM authentication direct to winbind via Samba's libwbclient library. More...
 
static char * wbclient_normalise_username (TALLOC_CTX *ctx, struct wbcContext *wb_ctx, char const *dom_name, char const *name)
 Use Winbind to normalise a username. More...
 

Detailed Description

NTLM authentication against the wbclient library.

Id
4830fdc165af4b651b24ffb16ef4cc38db7ad38d

Definition in file auth_wbclient.c.

Macro Definition Documentation

◆ NT_LENGTH

#define NT_LENGTH   24

Definition at line 42 of file auth_wbclient.c.

◆ WBC_MSV1_0_ALLOW_MSVCHAPV2

#define WBC_MSV1_0_ALLOW_MSVCHAPV2   0x00010000

Definition at line 39 of file auth_wbclient.c.

Function Documentation

◆ do_auth_wbclient()

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 
)

Check NTLM authentication direct to winbind via Samba's libwbclient library.

Parameters
[in]instModule instance.
[in]requestCurrent request.
[in]challengeMS CHAP challenge.
[in]responseMS CHAP response.
[out]nthashhashHash returned on success.
[in]env_dataCall_env data for current authentication.
Returns
  • 0 success.
  • -1 auth failure.
  • -648 password expired.

Definition at line 93 of file auth_wbclient.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wbclient_normalise_username()

static char* wbclient_normalise_username ( TALLOC_CTX *  ctx,
struct wbcContext *  wb_ctx,
char const *  dom_name,
char const *  name 
)
static

Use Winbind to normalise a username.

Parameters
[in]ctxThe talloc context where the result is parented from
[in]wb_ctxThe winbind context
[in]dom_nameThe domain of the user
[in]nameThe username (without the domain) to be normalised
Returns
  • The username with the casing according to the Winbind remote server.
  • NULL if the username could not be found.

Definition at line 54 of file auth_wbclient.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: