From: Mathieu Parent Date: Fri, 24 Aug 2018 04:51:04 +0000 (+0200) Subject: Relax GPGME version check X-Git-Tag: tdb-1.4.1~544 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ae2fb2e7403191296f7c74f3098fbe121f0796a;p=thirdparty%2Fsamba.git Relax GPGME version check The current method require at least the same version as during the build. This is not needed. Used symbols indicate the minimum is 1.2.0 Bug-Debian: http://bugs.debian.org/886333 BUG: https://bugzilla.samba.org/show_bug.cgi?id=13880 Signed-off-by: Mathieu Parent Reviewed-by: Andrew Bartlett Reviewed-by: Douglas Bagnall --- diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c index a010d4b9026..e740de8fb4e 100644 --- a/source4/dsdb/samdb/ldb_modules/password_hash.c +++ b/source4/dsdb/samdb/ldb_modules/password_hash.c @@ -52,6 +52,14 @@ #ifdef ENABLE_GPGME #undef class #include + +/* + * 1.2.0 is what dpkg-shlibdeps generates, based on used symbols and + * libgpgme11.symbols + * https://salsa.debian.org/debian/gpgme/blob/debian/master/debian/libgpgme11.symbols + */ + +#define MINIMUM_GPGME_VERSION "1.2.0" #endif /* If we have decided there is a reason to work on this request, then @@ -4817,13 +4825,13 @@ int ldb_password_hash_module_init(const char *version) * if none is active already. See: * https://www.gnupg.org/documentation/manuals/gpgme/Signal-Handling.html#Signal-Handling */ - gversion = gpgme_check_version(GPGME_VERSION); + gversion = gpgme_check_version(MINIMUM_GPGME_VERSION); if (gversion == NULL) { fprintf(stderr, "%s() in %s version[%s]: " "gpgme_check_version(%s) not available, " "gpgme_check_version(NULL) => '%s'\n", __func__, __FILE__, version, - GPGME_VERSION, gpgme_check_version(NULL)); + MINIMUM_GPGME_VERSION, gpgme_check_version(NULL)); return LDB_ERR_UNAVAILABLE; } #endif /* ENABLE_GPGME */