smbstatus: add a sessions dictionary
commit836fd468c0dc0e13c8f0f7341260947b20ec6243
authorJule Anger <janger@samba.org>
Thu, 24 Mar 2022 13:09:35 +0000 (24 14:09 +0100)
committerJule Anger <janger@samba.org>
Mon, 8 Aug 2022 12:56:28 +0000 (8 12:56 +0000)
treeba4dc5dca3f58338b83488466bd9c69fa750cb74
parent1abae1c255c32c7da713e218c1c8b35f37c60c1c
smbstatus: add a sessions dictionary

Adds an empty json dictionary under the key "sessions" and adds foreach
session a dictionary with information to the session dictionary. Uses the
session_id as key.
uid_str and gid_str are needed because both receive their own JSON field.

Only print to stdout, if json_output is not set.

Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/utils/status.c
source3/utils/status_json.c
source3/utils/status_json.h
source3/utils/status_json_dummy.c