[RFC PATCH v3 0/5] add JSON output to net ads

Philipp Gesang philipp.gesang at intra2net.com
Thu Jul 12 07:04:04 UTC 2018

Changes in v3:

* remove an unused variable.

* rebase onto:

* full branch available on gitlab:

* add one tiny patch that drops an unnecessary json_free().

Changes in v2:

* rebase onto the error handling branch:

* change signature of json_is_invalid() to accept const*.

* use json_add_guid() instead of dumping uuid manually.

V1 blurb:

The informational commands of the ``net ads'' family format their output in an
ad-hoc manner that is not specified. For automated processing it would be
useful to optionally encode the output as JSON.

These two patches against master add such a JSON output to ``net ads info'' and
``net ads lookup''. They have been forward-ported from the 4.7-ish Samba that
we run. Compilation succeeds with master but I'm still in the process of getting
working test environment, so they're virtually untested.

Philipp Gesang (5):
  lib/audit_logging: heal merge damage
  lib/audit_logging: make json_is_invalid() accept a const*
  lib/audit_logging: avoid freeing unallocated json value
  s3: net: implement json output for ads info
  s3: net: implement json output for ads lookup

 lib/audit_logging/audit_logging.c          |   3 +-
 lib/audit_logging/audit_logging.h          |   2 +-
 source3/utils/net.c                        |   1 +
 source3/utils/net.h                        |   1 +
 source3/utils/net_ads.c                    | 332 +++++++++++++++++++++++++++++
 source3/utils/wscript_build                |   2 +
 source4/dsdb/samdb/ldb_modules/audit_log.c |  43 +++-
 7 files changed, 374 insertions(+), 10 deletions(-)


More information about the samba-technical mailing list