From: Volker Lendecke Date: Fri, 26 Oct 2018 06:25:14 +0000 (+0200) Subject: audit_logging: Use dom_sid_str_buf X-Git-Tag: tdb-1.3.17~950 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74c7e3d19a590c64e0bedbb3756f23c8d6f6369e;p=thirdparty%2Fsamba.git audit_logging: Use dom_sid_str_buf Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/lib/audit_logging/audit_logging.c b/lib/audit_logging/audit_logging.c index c274e971925..acccb9f7ab9 100644 --- a/lib/audit_logging/audit_logging.c +++ b/lib/audit_logging/audit_logging.c @@ -826,14 +826,14 @@ int json_add_sid(struct json_object *object, return ret; } } else { - char sid_buf[DOM_SID_STR_BUFLEN]; + struct dom_sid_buf sid_buf; - dom_sid_string_buf(sid, sid_buf, sizeof(sid_buf)); - ret = json_add_string(object, name, sid_buf); + ret = json_add_string( + object, name, dom_sid_str_buf(sid, &sid_buf)); if (ret != 0) { DBG_ERR("Unable to add SID [%s] value [%s]\n", name, - sid_buf); + sid_buf.buf); return ret; } }