*
*/
static void log_json(struct imessaging_context *msg_ctx,
+ struct loadparm_context *lp_ctx,
struct json_context *context,
const char *type, int debug_class, int debug_level)
{
}
DEBUGC(debug_class, debug_level, ("JSON %s: %s\n", type, json));
- auth_message_send(msg_ctx, json);
+ if (msg_ctx && lp_ctx && lpcfg_auth_event_notification(lp_ctx)) {
+ auth_message_send(msg_ctx, json);
+ }
if (json) {
free(json);
add_string(&authentication, "passwordType", get_password_type(ui));
add_object(&context,AUTH_JSON_TYPE, &authentication);
- log_json(msg_ctx, &context, AUTH_JSON_TYPE, DBGC_AUTH_AUDIT, debug_level);
+ log_json(msg_ctx,
+ lp_ctx,
+ &context,
+ AUTH_JSON_TYPE,
+ DBGC_AUTH_AUDIT,
+ debug_level);
free_json_context(&context);
}
add_object(&context,AUTHZ_JSON_TYPE, &authorization);
log_json(msg_ctx,
+ lp_ctx,
&context,
AUTHZ_JSON_TYPE,
DBGC_AUTH_AUDIT,
if (ui->password_type != NULL) {
password_type = ui->password_type;
+ } else if (ui->auth_description != NULL &&
+ strncmp("ServerAuthenticate", ui->auth_description, 18) == 0)
+ {
+ if (ui->netlogon_trust_account.negotiate_flags
+ & NETLOGON_NEG_SUPPORTS_AES) {
+ password_type = "HMAC-SHA256";
+ } else if (ui->netlogon_trust_account.negotiate_flags
+ & NETLOGON_NEG_STRONG_KEYS) {
+ password_type = "HMAC-MD5";
+ } else {
+ password_type = "DES";
+ }
} else if (ui->password_state == AUTH_PASSWORD_RESPONSE &&
(ui->logon_parameters & MSV1_0_ALLOW_MSVCHAPV2) &&
ui->password.response.nt.length == 24) {