The branch, master has been updated via 0991946ab2e heimdal_build: Remove memset_s from roken, already in libreplace via d6a1a849a2a heimdal_build: Use HAVE___ATTRIBUTE__ for unused, noreturn and unused_result via 6f7b555dad9 heimdal_build: Do not list hx509 files twice via 93de0f017fd Allow overflow in lib/hx509.c and lib/gssapi/mech/gss_inquire_cred.c via de18c9bf410 heimdal_build: Allow errors integer overflow errors in gen.c (only) via 75e1000d280 heimdal_build: consistently pass extra_cflags=cflags to HEIMDAL_CFLAGS() from ccfefe28909 s4:samba: split out a samba_service_init() helper function
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 0991946ab2e64cb9aa3ed9f177e5a545c82c7b3d Author: Andrew Bartlett <abart...@samba.org> Date: Thu Dec 20 16:24:28 2018 +1300 heimdal_build: Remove memset_s from roken, already in libreplace Signed-off-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> Autobuild-User(master): Stefan Metzmacher <me...@samba.org> Autobuild-Date(master): Tue Nov 30 19:18:59 UTC 2021 on sn-devel-184 commit d6a1a849a2aec1172ead1b85482b4cea37cd10bd Author: Gary Lockyer <g...@catalyst.net.nz> Date: Fri Sep 29 10:22:20 2017 +1300 heimdal_build: Use HAVE___ATTRIBUTE__ for unused, noreturn and unused_result [abart...@samba.org Squashed with TODO commit from Gary that provided HEIMDAL_UNUSED_ATTRIBUTE etc] Signed-off-by: Gary Lockyer <g...@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 6f7b555dad96f9d36cb48d46b232a74f18ce2eb7 Author: Andrew Bartlett <abart...@samba.org> Date: Wed Nov 24 11:49:37 2021 +1300 heimdal_build: Do not list hx509 files twice This makes maintaining the file lists easier. Signed-off-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 93de0f017fddbd84e1356c7bdc5c43ab7456422e Author: Andrew Bartlett <abart...@samba.org> Date: Wed Jul 7 15:23:17 2021 +1200 Allow overflow in lib/hx509.c and lib/gssapi/mech/gss_inquire_cred.c This is in preperation for the Heimdal upgrade (which otherwise can be compiled with stricter flags). Signed-off-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit de18c9bf4108dd4f838a4711eda0ed2a59f6ff09 Author: Andrew Bartlett <abart...@samba.org> Date: Tue Jul 6 12:26:17 2021 +1200 heimdal_build: Allow errors integer overflow errors in gen.c (only) This is in preperation for the Heimdal upgrade. Signed-off-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 75e1000d280a1310d64c9bfffe55f7b67b402463 Author: Stefan Metzmacher <me...@samba.org> Date: Tue Nov 30 17:03:06 2021 +0100 heimdal_build: consistently pass extra_cflags=cflags to HEIMDAL_CFLAGS() Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> ----------------------------------------------------------------------- Summary of changes: source4/heimdal_build/config.h | 3 --- source4/heimdal_build/include/krb5-types.h | 35 ++++++++++++++++++++++++++++++ source4/heimdal_build/roken.h | 4 ++++ source4/heimdal_build/wscript_build | 25 ++++++++++++++++----- source4/heimdal_build/wscript_configure | 7 +++--- 5 files changed, 62 insertions(+), 12 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/heimdal_build/config.h b/source4/heimdal_build/config.h index fb43cdc1319..d9ba31b3b45 100644 --- a/source4/heimdal_build/config.h +++ b/source4/heimdal_build/config.h @@ -9,9 +9,6 @@ #include "include/config.h" #include "../replace/replace.h" #include "../lib/util/attr.h" -#define HEIMDAL_NORETURN_ATTRIBUTE _NORETURN_ -#define HEIMDAL_PRINTF_ATTRIBUTE(x) FORMAT_ATTRIBUTE(x) -#define HEIMDAL_UNUSED_ATTRIBUTE _UNUSED_ #define VERSIONLIST {"Lorikeet-Heimdal, Modified for Samba4"} diff --git a/source4/heimdal_build/include/krb5-types.h b/source4/heimdal_build/include/krb5-types.h index 7e9972b8a6a..62a54dd9722 100644 --- a/source4/heimdal_build/include/krb5-types.h +++ b/source4/heimdal_build/include/krb5-types.h @@ -16,6 +16,41 @@ typedef int krb5_socket_t; typedef ssize_t krb5_ssize_t; #endif + +#ifndef HEIMDAL_DEPRECATED +#define HEIMDAL_DEPRECATED _DEPRECATED_ +#endif + +#ifndef HEIMDAL_PRINTF_ATTRIBUTE +#ifdef HAVE_ATTRIBUTE_PRINTF +#define HEIMDAL_PRINTF_ATTRIBUTE(x) __attribute__((format x)) +#else +#define HEIMDAL_PRINTF_ATTRIBUTE(x) +#endif +#endif + +#ifndef HEIMDAL_NORETURN_ATTRIBUTE +#ifdef HAVE___ATTRIBUTE__ +#define HEIMDAL_NORETURN_ATTRIBUTE __attribute__((noreturn)) +#else +#define HEIMDAL_NORETURN_ATTRIBUTE +#endif +#endif + +#ifndef HEIMDAL_UNUSED_ATTRIBUTE +#ifdef HAVE___ATTRIBUTE__ +#define HEIMDAL_UNUSED_ATTRIBUTE __attribute__((unused)) +#else +#define HEIMDAL_UNUSED_ATTRIBUTE +#endif +#endif + +#ifndef HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE +#ifdef HAVE___ATTRIBUTE__ #define HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE _WARN_UNUSED_RESULT_ +#else +#define HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE +#endif +#endif #endif /* __samb_krb5_types_h__ */ diff --git a/source4/heimdal_build/roken.h b/source4/heimdal_build/roken.h index 56aa6aaed09..351dc707adf 100644 --- a/source4/heimdal_build/roken.h +++ b/source4/heimdal_build/roken.h @@ -123,6 +123,10 @@ #define HAVE_SETEUID #endif +#ifndef HAVE_MEMSET_S +#define HAVE_MEMSET_S +#endif + #ifndef HAVE_DIRFD #ifdef HAVE_DIR_DD_FD #define dirfd(x) ((x)->dd_fd) diff --git a/source4/heimdal_build/wscript_build b/source4/heimdal_build/wscript_build index 9b82d1b98de..079cac744f9 100644 --- a/source4/heimdal_build/wscript_build +++ b/source4/heimdal_build/wscript_build @@ -212,11 +212,11 @@ def HEIMDAL_GENERATOR(name, rule, source='', target='', name=name) -def HEIMDAL_LIBRARY(libname, source, deps, version_script, includes=''): +def HEIMDAL_LIBRARY(libname, source, deps, version_script, includes='', cflags=''): '''define a Heimdal library''' cflags, cflags_end, allow_warnings = HEIMDAL_CFLAGS(use_hostcc=False, - extra_cflags=[]) + extra_cflags=cflags) source = heimdal_paths(source) orig_vscript_map = heimdal_path(version_script, absolute=False) bld.SAMBA_LIBRARY(libname, source, @@ -280,7 +280,8 @@ def HEIMDAL_BINARY(binname, source, install_path=None): '''define a Samba binary''' - cflags, cflags_end, allow_warnings = HEIMDAL_CFLAGS(use_hostcc=use_hostcc) + cflags, cflags_end, allow_warnings = HEIMDAL_CFLAGS(use_hostcc=use_hostcc, + extra_cflags=cflags) source = heimdal_paths(source) obj_target = binname + '.heimdal.objlist' @@ -558,6 +559,7 @@ if not bld.CONFIG_SET("USING_SYSTEM_GSSAPI"): lib/gssapi/mech/gss_set_cred_option.c lib/gssapi/mech/gss_pseudo_random.c ../heimdal_build/gssapi-glue.c''', includes='../heimdal/lib/gssapi ../heimdal/lib/gssapi/gssapi ../heimdal/lib/gssapi/spnego ../heimdal/lib/gssapi/krb5 ../heimdal/lib/gssapi/mech', deps='hcrypto asn1 HEIMDAL_SPNEGO_ASN1 HEIMDAL_GSSAPI_ASN1 roken krb5 com_err wind heimbase', + cflags=bld.env.HEIMDAL_UNPICKY_WNO_STRICT_OVERFLOW_CFLAGS, version_script='lib/gssapi/version-script.map', ) @@ -784,9 +786,10 @@ if not bld.CONFIG_SET("USING_SYSTEM_HX509"): options="-q -P comment -p") HEIMDAL_LIBRARY('hx509', - 'lib/hx509/ca.c lib/hx509/cert.c lib/hx509/cms.c lib/hx509/collector.c lib/hx509/crypto.c lib/hx509/error.c lib/hx509/env.c lib/hx509/file.c lib/hx509/keyset.c lib/hx509/ks_dir.c lib/hx509/ks_file.c lib/hx509/ks_keychain.c lib/hx509/ks_mem.c lib/hx509/ks_null.c lib/hx509/ks_p11.c lib/hx509/ks_p12.c lib/hx509/lock.c lib/hx509/name.c lib/hx509/peer.c lib/hx509/print.c lib/hx509/req.c lib/hx509/revoke.c lib/hx509/sel.c lib/hx509/hx509_err.c lib/hx509/sel-lex.l lib/hx509/sel-gram.y', + HEIMDAL_HX509_OBJH_SOURCE + ' lib/hx509/sel-lex.l lib/hx509/sel-gram.y', includes='../heimdal/lib/hx509', deps='roken com_err asn1 hcrypto asn1 HEIMDAL_OCSP_ASN1 HEIMDAL_PKCS8_ASN1 HEIMDAL_PKCS9_ASN1 HEIMDAL_PKCS12_ASN1 HEIMDAL_PKCS10_ASN1 wind', + cflags=bld.env.HEIMDAL_UNPICKY_WNO_STRICT_OVERFLOW_CFLAGS, version_script='lib/hx509/version-script.map', ) @@ -853,6 +856,15 @@ HEIMDAL_SUBSYSTEM('HEIMDAL_VERS_HOSTCC', use_global_deps=False, use_hostcc=True) +HEIMDAL_SUBSYSTEM('HEIMDAL_ASN1_GEN_HOSTCC', + 'lib/asn1/gen.c', + includes='../heimdal/lib/asn1', + group='hostcc_build_main', + cflags=bld.env.HEIMDAL_UNPICKY_WNO_STRICT_OVERFLOW_CFLAGS, + deps='ROKEN_HOSTCC', + use_global_deps=False, + use_hostcc=True) + HEIMDAL_SUBSYSTEM('HEIMDAL_VERS', 'lib/vers/print_version.c ../heimdal_build/version.c', deps='roken replace') @@ -861,7 +873,7 @@ HEIMDAL_SUBSYSTEM('HEIMDAL_VERS', if not bld.CONFIG_SET('USING_SYSTEM_ASN1_COMPILE'): # here is the asn1 compiler build rule HEIMDAL_BINARY('asn1_compile', - 'lib/asn1/gen.c lib/asn1/gen_copy.c ' + 'lib/asn1/gen_copy.c ' 'lib/asn1/gen_decode.c lib/asn1/gen_encode.c lib/asn1/gen_free.c ' 'lib/asn1/gen_glue.c lib/asn1/gen_length.c lib/asn1/gen_seq.c ' 'lib/asn1/gen_template.c lib/asn1/hash.c lib/asn1/symbol.c ' @@ -870,7 +882,8 @@ if not bld.CONFIG_SET('USING_SYSTEM_ASN1_COMPILE'): use_global_deps=False, includes='../heimdal/lib/asn1', group='hostcc_build_main', - deps='ROKEN_HOSTCC LIBREPLACE_HOSTCC HEIMDAL_VERS_HOSTCC', + deps='ROKEN_HOSTCC LIBREPLACE_HOSTCC HEIMDAL_VERS_HOSTCC ' + 'HEIMDAL_ASN1_GEN_HOSTCC', install=False ) bld.env['ASN1_COMPILE'] = os.path.join(bld.bldnode.parent.abspath(), 'asn1_compile') diff --git a/source4/heimdal_build/wscript_configure b/source4/heimdal_build/wscript_configure index c4a3b1de99f..7ac54190590 100644 --- a/source4/heimdal_build/wscript_configure +++ b/source4/heimdal_build/wscript_configure @@ -81,6 +81,10 @@ for flag in heimdal_no_error_flags: flag, testflags=True) +conf.ADD_NAMED_CFLAGS('HEIMDAL_UNPICKY_WNO_STRICT_OVERFLOW_CFLAGS', + '-Wno-strict-overflow', + testflags=True) + if len(bld.env.HEIMDAL_NO_ERROR_CFLAGS) == len(heimdal_no_error_flags): Logs.info("Most warnings in Heimdal code will " "error due to -Werror (good)") @@ -88,9 +92,6 @@ else: conf.env.allow_heimdal_warnings = True # Needed on CentOS 7 and Ubuntu 16.04 only for Bison generated # files when we are not doing strict warnings -> errors - conf.ADD_NAMED_CFLAGS('HEIMDAL_UNPICKY_WNO_STRICT_OVERFLOW_CFLAGS', - '-Wno-strict-overflow', - testflags=True) conf.ADD_NAMED_CFLAGS('HEIMDAL_UNPICKY_WNO_MAYBE_UNINITIALIZED_CFLAGS', '-Wno-error=maybe-uninitialized', testflags=True) -- Samba Shared Repository