1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

audit_log: Use dom_sid_str_buf

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2019-01-08 09:47:40 +01:00 committed by Jeremy Allison
parent 7d9b760418
commit 071af60d74

View File

@ -778,7 +778,7 @@ static char *password_change_human_readable(
struct ldb_context *ldb = NULL;
const char *remote_host = NULL;
const struct dom_sid *sid = NULL;
const char *user_sid = NULL;
struct dom_sid_buf user_sid;
const char *timestamp = NULL;
char *log_entry = NULL;
const char *action = NULL;
@ -790,7 +790,6 @@ static char *password_change_human_readable(
remote_host = dsdb_audit_get_remote_host(ldb, ctx);
sid = dsdb_audit_get_user_sid(module);
user_sid = dom_sid_string(ctx, sid);
timestamp = audit_get_timestamp(ctx);
action = get_password_action(request, reply);
dn = dsdb_audit_get_primary_dn(request);
@ -803,7 +802,7 @@ static char *password_change_human_readable(
timestamp,
ldb_strerror(reply->error),
remote_host,
user_sid,
dom_sid_str_buf(sid, &user_sid),
dn);
TALLOC_FREE(ctx);
return log_entry;
@ -930,7 +929,7 @@ static char *operation_human_readable(
struct ldb_context *ldb = NULL;
const char *remote_host = NULL;
const struct dom_sid *sid = NULL;
const char *user_sid = NULL;
struct dom_sid_buf user_sid;
const char *timestamp = NULL;
const char *op_name = NULL;
char *log_entry = NULL;
@ -948,7 +947,6 @@ static char *operation_human_readable(
} else {
sid = dsdb_audit_get_user_sid(module);
}
user_sid = dom_sid_string(ctx, sid);
timestamp = audit_get_timestamp(ctx);
op_name = dsdb_audit_get_operation_name(request);
dn = dsdb_audit_get_primary_dn(request);
@ -964,7 +962,7 @@ static char *operation_human_readable(
timestamp,
ldb_strerror(reply->error),
remote_host,
user_sid,
dom_sid_str_buf(sid, &user_sid),
dn);
if (new_dn != NULL) {
log_entry = talloc_asprintf_append_buffer(