minimum version of libjansson dependency

Philipp Gesang philipp.gesang at intra2net.com
Mon Oct 15 09:24:39 UTC 2018


-<| Quoting Andrew Bartlett <abartlet at samba.org>, on Saturday, 2018-10-13 08:21:16 AM |>-
> On Fri, 2018-10-05 at 15:16 +0200, Philipp Gesang via samba-technical
> wrote:
> > Hi,
> > 
> > what version of libjansson does Samba assume?
> > 
> > The reason I’m asking is that I just noticed the gitlab CI
> > containers lack the json_loadfd() symbol that was introduced in
> > 2017. (Commit 1672bb5a65 to be precise, available from 2.10 on.)
> > So far I’ve been relying on this API while working on dumping /
> > undumping credentials.
> > 
> > Would a version switch be acceptable? Example:
> > https://gitlab.com/phgsng/samba/commit/30bae689fd0835ad11d4ea3ebfc9e601f217e428#b34a593c1e0ea53fe3287233c88b273e6a6f045b_285_285
> 
> Until we get sn-devel upgraded, you need to be able to run and fully
> test on the version in Ubuntu 14.04.  I would rather not have a version
> switch, can you instead just load the file with fd_load()?

My current approach is to have compile time fallback for older
jansson libs that boils down to json_loadf(fdopen(fd), …).

https://gitlab.com/phgsng/samba/commit/b14170a64abdd96f522c43b8f7f9f6855f803b88#a62507c370e52d9296eca2288f2c1346c95ed621_1106_1352

Internally jansson will traverse the input with stdio functions
instead of read(2). This should be more efficient and robust than
reading the entire contents up front, so I’d prefer this to
become the default.

Best,
Philipp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20181015/e463322c/signature.sig>


More information about the samba-technical mailing list