Lines 201-206
static void auth_message_send(struct imessaging_context *msg_ctx,
|
Link Here
|
---|
|
201 |
* |
201 |
* |
202 |
*/ |
202 |
*/ |
203 |
static void log_json(struct imessaging_context *msg_ctx, |
203 |
static void log_json(struct imessaging_context *msg_ctx, |
|
|
204 |
struct loadparm_context *lp_ctx, |
204 |
struct json_context *context, |
205 |
struct json_context *context, |
205 |
const char *type, int debug_class, int debug_level) |
206 |
const char *type, int debug_class, int debug_level) |
206 |
{ |
207 |
{ |
Lines 218-224
static void log_json(struct imessaging_context *msg_ctx,
|
Link Here
|
---|
|
218 |
} |
219 |
} |
219 |
|
220 |
|
220 |
DEBUGC(debug_class, debug_level, ("JSON %s: %s\n", type, json)); |
221 |
DEBUGC(debug_class, debug_level, ("JSON %s: %s\n", type, json)); |
221 |
auth_message_send(msg_ctx, json); |
222 |
if (msg_ctx && lp_ctx && lpcfg_auth_event_notification(lp_ctx)) { |
|
|
223 |
auth_message_send(msg_ctx, json); |
224 |
} |
222 |
|
225 |
|
223 |
if (json) { |
226 |
if (json) { |
224 |
free(json); |
227 |
free(json); |
Lines 502-508
static void log_authentication_event_json(
|
Link Here
|
---|
|
502 |
add_string(&authentication, "passwordType", get_password_type(ui)); |
505 |
add_string(&authentication, "passwordType", get_password_type(ui)); |
503 |
add_object(&context,AUTH_JSON_TYPE, &authentication); |
506 |
add_object(&context,AUTH_JSON_TYPE, &authentication); |
504 |
|
507 |
|
505 |
log_json(msg_ctx, &context, AUTH_JSON_TYPE, DBGC_AUTH_AUDIT, debug_level); |
508 |
log_json(msg_ctx, |
|
|
509 |
lp_ctx, |
510 |
&context, |
511 |
AUTH_JSON_TYPE, |
512 |
DBGC_AUTH_AUDIT, |
513 |
debug_level); |
506 |
free_json_context(&context); |
514 |
free_json_context(&context); |
507 |
} |
515 |
} |
508 |
|
516 |
|
Lines 566-571
static void log_successful_authz_event_json(
|
Link Here
|
---|
|
566 |
add_object(&context,AUTHZ_JSON_TYPE, &authorization); |
574 |
add_object(&context,AUTHZ_JSON_TYPE, &authorization); |
567 |
|
575 |
|
568 |
log_json(msg_ctx, |
576 |
log_json(msg_ctx, |
|
|
577 |
lp_ctx, |
569 |
&context, |
578 |
&context, |
570 |
AUTHZ_JSON_TYPE, |
579 |
AUTHZ_JSON_TYPE, |
571 |
DBGC_AUTH_AUDIT, |
580 |
DBGC_AUTH_AUDIT, |