mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
lib:audit_logging: Add function to return the JSON null object
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
b11ad8b137
commit
f9c55b84ef
@ -1213,6 +1213,23 @@ struct json_object json_get_object(struct json_object *object, const char *name)
|
||||
return o;
|
||||
}
|
||||
|
||||
/*
|
||||
* @brief Return the JSON null object.
|
||||
*
|
||||
* @return the JSON null object.
|
||||
*/
|
||||
_WARN_UNUSED_RESULT_ struct json_object json_null_object(void)
|
||||
{
|
||||
struct json_object object = json_empty_object;
|
||||
|
||||
object.root = json_null();
|
||||
if (object.root != NULL) {
|
||||
object.valid = true;
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
/*
|
||||
* @brief Create a JSON object from a structure containing audit information.
|
||||
*
|
||||
|
@ -105,6 +105,7 @@ _WARN_UNUSED_RESULT_ struct json_object json_get_object(
|
||||
struct json_object *object, const char *name);
|
||||
_WARN_UNUSED_RESULT_ char *json_to_string(TALLOC_CTX *mem_ctx,
|
||||
const struct json_object *object);
|
||||
_WARN_UNUSED_RESULT_ struct json_object json_null_object(void);
|
||||
struct authn_audit_info;
|
||||
_WARN_UNUSED_RESULT_ struct json_object json_from_audit_info(
|
||||
const struct authn_audit_info *audit_info);
|
||||
|
Loading…
Reference in New Issue
Block a user