[RFC PATCH 0/2] add JSON output to net ads
abartlet at samba.org
Fri Jul 6 20:28:17 UTC 2018
On Fri, 2018-07-06 at 13:02 -0700, Jeremy Allison wrote:
> On Sat, Jul 07, 2018 at 07:45:44AM +1200, Andrew Bartlett wrote:
> > On Fri, 2018-07-06 at 10:37 -0700, Jeremy Allison via samba-technical
> > wrote:
> > > On Fri, Jul 06, 2018 at 04:48:51PM +0200, Philipp Gesang via samba-technical wrote:
> > > > Hey guys,
> > > >
> > > > 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.
> > > >
> > > > I'd appreciate your feedback.
> > >
> > > Sorry, I'm going to have to do a NAK on this work
> > > until the json_XXX() code is fixed to stop returning
> > > (void) on errors.
> > >
> > > The longer this sore remains in the code, the more
> > > code we'll have to fix until it's done correctly.
> > >
> > > I'm going to NAK anything adding more (void)json_XXX()
> > > calls until this gets fixed.
> > The patches to get that done are here:
> > https://gitlab.com/catalyst-samba/samba/commits/gary-audit-lib
> > I had to pull Gary onto a more urgent task which is why this didn't get
> > submitted yet.
> > Philipp,
> > If you base your work on that (and add the tests you already mention
> > are missing) then hopefully we can get this into master in time.
> > Thanks for your interest in JSON formatting!
> Oh thanks so much for that ! I'm 100% happy to review
> once you think it's in a mergeable state :-).
Gary kind of went to town with the testing of that (don't ask Gary to
return error codes and then not check if they fail), so this includes
some of our first use of actual function mocking using cmocka, even for
Gary is really careful (a long life before Samba as a maintenance
programmer), so he doesn't do things if he isn't going to do them
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba
More information about the samba-technical