We better print "... remote host [Unknown] SID [S-1-5-18] ..."
in 'dsdb_audit' message, this matches what we print for
'dsdb_json_audit'.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13916
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
{
struct ldb_context *ldb = NULL;
const char *remote_host = NULL;
{
struct ldb_context *ldb = NULL;
const char *remote_host = NULL;
+ const struct tsocket_address *remote = NULL;
const struct dom_sid *sid = NULL;
struct dom_sid_buf user_sid;
const char *timestamp = NULL;
const struct dom_sid *sid = NULL;
struct dom_sid_buf user_sid;
const char *timestamp = NULL;
ldb = ldb_module_get_ctx(module);
remote_host = dsdb_audit_get_remote_host(ldb, ctx);
ldb = ldb_module_get_ctx(module);
remote_host = dsdb_audit_get_remote_host(ldb, ctx);
- if (remote_host != NULL && dsdb_audit_is_system_session(module)) {
+ remote = dsdb_audit_get_remote_address(ldb);
+ if (remote != NULL && dsdb_audit_is_system_session(module)) {
sid = dsdb_audit_get_actual_sid(ldb);
} else {
sid = dsdb_audit_get_user_sid(module);
sid = dsdb_audit_get_actual_sid(ldb);
} else {
sid = dsdb_audit_get_user_sid(module);