2023-08-16 22:26:55 +00:00
|
|
|
Avoid printf("%s", NULL);
|
|
|
|
|
|
|
|
Index: auth/auth_log.c
|
|
|
|
--- auth/auth_log.c.orig
|
|
|
|
+++ auth/auth_log.c
|
2023-09-08 05:21:37 +00:00
|
|
|
@@ -833,7 +833,8 @@ static void log_authentication_event_human_readable(
|
2023-08-16 22:26:55 +00:00
|
|
|
ui->netlogon_trust_account.account_name);
|
|
|
|
nl = talloc_asprintf(frame,
|
|
|
|
" NETLOGON computer [%s] trust account [%s]",
|
|
|
|
- trust_computer_name, trust_account_name);
|
|
|
|
+ trust_computer_name, trust_account_name ?
|
|
|
|
+ trust_account_name : "(NULL)");
|
|
|
|
}
|
|
|
|
|
|
|
|
remote = tsocket_address_string(ui->remote_host, frame);
|
2023-09-08 05:21:37 +00:00
|
|
|
@@ -851,8 +852,10 @@ static void log_authentication_event_human_readable(
|
2023-08-16 22:26:55 +00:00
|
|
|
logon_line = talloc_asprintf(
|
|
|
|
frame,
|
|
|
|
" mapped to [%s]\\[%s].",
|
|
|
|
- log_escape(frame, ui->mapped.domain_name),
|
|
|
|
- log_escape(frame, ui->mapped.account_name));
|
|
|
|
+ log_escape(frame, ui->mapped.domain_name ?
|
|
|
|
+ ui->mapped.domain_name : "(NULL)"),
|
|
|
|
+ log_escape(frame, ui->mapped.account_name ?
|
|
|
|
+ ui->mapped.account_name : "(NULL)"));
|
|
|
|
}
|
|
|
|
|
|
|
|
DEBUGC(DBGC_AUTH_AUDIT, debug_level,
|
2023-09-08 05:21:37 +00:00
|
|
|
@@ -862,13 +865,14 @@ static void log_authentication_event_human_readable(
|
2023-08-16 22:26:55 +00:00
|
|
|
"%s local host [%s]"
|
|
|
|
" %s\n",
|
|
|
|
ui->service_description,
|
|
|
|
- ui->auth_description,
|
|
|
|
- log_escape(frame, clientDomain),
|
|
|
|
+ ui->auth_description ? ui->auth_description : "(NULL)",
|
|
|
|
+ log_escape(frame, clientDomain ? clientDomain : "(NULL)"),
|
|
|
|
log_escape(frame, clientAccount),
|
|
|
|
ts,
|
|
|
|
- password_type,
|
|
|
|
+ password_type ? password_type : "(NULL)",
|
|
|
|
nt_errstr(status),
|
|
|
|
- log_escape(frame, ui->workstation_name),
|
|
|
|
+ log_escape(frame, ui->workstation_name ?
|
|
|
|
+ ui->workstation_name : "(NULL)"),
|
|
|
|
remote,
|
|
|
|
logon_line,
|
|
|
|
local,
|