From 6fda57d3097e4e02310d7cfdba4f8ee27a69fb93 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 10 May 2018 13:01:05 +1200 Subject: [PATCH] build: Make --with-json-audit the default Thanks to Rowland for a clear description of the behaviour for the smb.conf manpage. This means that those not wanting to link to libarchive will just need to build --without-json-audit. In general, we prefer that optional libraries be required by default so that they are not accidentially missed, particularly in packages. Signed-off-by: Andrew Bartlett Reviewed-by: Stefan Metzmacher Reviewed-by: Gary Lockyer --- auth/wscript | 12 ++++++++---- docs-xml/smbdotconf/logging/loglevel.xml | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/auth/wscript b/auth/wscript index b81804e4644..7b2c65effe0 100644 --- a/auth/wscript +++ b/auth/wscript @@ -4,7 +4,7 @@ import Logs, Options, Utils import samba3 def set_options(opt): - help = ("Build with JSON auth audit support (default=auto). " + help = ("Build with JSON auth audit support (default=True). " "This requires the jansson devel package.") opt.SAMBA3_ADD_OPTION('json-audit', default=None, help=(help)) @@ -20,9 +20,13 @@ def configure(conf): conf.CHECK_FUNCS_IN('json_object', 'jansson') if not conf.CONFIG_GET('HAVE_JSON_OBJECT'): - if Options.options.with_json_audit == True: - conf.fatal('JSON support requested, but no suitable jansson ' - 'library found') + if Options.options.with_json_audit != False: + conf.fatal("JSON support not found. " + "Try installing libjansson-dev or jansson-devel. " + "Otherwise, use --without-json-audit to build without " + "JSON support. " + "JSON support is required for the JSON " + "formatted audit log feature") if conf.CONFIG_GET('ENABLE_SELFTEST') and \ (not Options.options.without_ad_dc): raise Utils.WafError('jansson JSON library required for ' diff --git a/docs-xml/smbdotconf/logging/loglevel.xml b/docs-xml/smbdotconf/logging/loglevel.xml index d3b5c457d0c..fae5c7b079e 100644 --- a/docs-xml/smbdotconf/logging/loglevel.xml +++ b/docs-xml/smbdotconf/logging/loglevel.xml @@ -49,8 +49,8 @@ Authentication and authorization audit information is logged - under the auth_audit, and if Samba is compiled against the jansson - JSON library, a JSON representation is logged under + under the auth_audit, and if Samba was not compiled with + --without-json-audit, a JSON representation is logged under auth_json_audit. Support is comprehensive for all authentication and authorisation