From f407801376e4caeb761c164f77e4fd8752dac214 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Tue, 30 Jan 2024 20:00:47 +0200 Subject: [PATCH] Detect samba private libraries Signed-off-by: Alexander Bokovoy --- 0010-support-samba-4.20.patch | 50 +++++++++++++++++++++++++++++++++++ freeipa.spec | 1 + 2 files changed, 51 insertions(+) create mode 100644 0010-support-samba-4.20.patch diff --git a/0010-support-samba-4.20.patch b/0010-support-samba-4.20.patch new file mode 100644 index 0000000..a716385 --- /dev/null +++ b/0010-support-samba-4.20.patch @@ -0,0 +1,50 @@ +From f8b444c563094173c17c3327d72ce9b70da254af Mon Sep 17 00:00:00 2001 +From: Alexander Bokovoy +Date: Tue, 30 Jan 2024 19:58:05 +0200 +Subject: [PATCH] ipa-kdb: support Samba 4.20 private libraries + +Samba 4.20 will change name extension of the private libraries from +'samba4' to 'private-samba'. Detect private extension through configure +step and make sure to use the right library name in Makefile. + +Signed-off-by: Alexander Bokovoy +--- + daemons/ipa-kdb/Makefile.am | 2 +- + server.m4 | 8 ++++++++ + 2 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/daemons/ipa-kdb/Makefile.am b/daemons/ipa-kdb/Makefile.am +index 777c6b4bd..ca1593bc8 100644 +--- a/daemons/ipa-kdb/Makefile.am ++++ b/daemons/ipa-kdb/Makefile.am +@@ -116,7 +116,7 @@ ipa_kdb_tests_LDADD = \ + $(top_builddir)/util/libutil.la \ + -lkdb5 \ + -lsss_idmap \ +- -lsamba-security-samba4 \ ++ -l$(SAMBA_SECURITY_LIBS)\ + -lsamba-errors \ + $(NULL) + +diff --git a/server.m4 b/server.m4 +index 2ee2cf519..f97ceddea 100644 +--- a/server.m4 ++++ b/server.m4 +@@ -182,6 +182,14 @@ AC_CHECK_LIB([smbldap],[smbldap_set_bind_callback], + [AC_DEFINE([HAVE_SMBLDAP_SET_BIND_CALLBACK], [1], [struct smbldap_state is opaque])], + [AC_MSG_WARN([libsmbldap is not opaque, not using smbldap_set_bind_callback])], + [$SAMBA40EXTRA_LIBPATH]) ++AC_CHECK_LIB([samba-security-private-samba],[dom_sid_string], ++ [SAMBA_SECURITY_LIBS=samba-security-private-samba], ++ [AC_CHECK_LIB([samba-security-samba4],[dom_sid_string], ++ [SAMBA_SECURITY_LIBS=samba-security-samba4], ++ [AC_MSG_ERROR([Cannot find private samba-security library])], ++ [$SAMBA40EXTRA_LIBPATH])], ++ [$SAMBA40EXTRA_LIBPATH]) ++AC_SUBST(SAMBA_SECURITY_LIBS) + + dnl --------------------------------------------------------------------------- + dnl Check for libunistring +-- +2.43.0 + diff --git a/freeipa.spec b/freeipa.spec index ed573aa..478a485 100644 --- a/freeipa.spec +++ b/freeipa.spec @@ -228,6 +228,7 @@ Patch0006: 0008-netbios-defaults.patch Patch0009: 0005-pyca-42.0.0-support.patch Patch0010: 0004-ipa-cli-krb5-crash.patch Patch0011: 0003-kdb-memory-leak.patch +Patch0012: 0010-support-samba-4.20.patch # RHEL spec file only: START: Change branding to IPA and Identity Management # Moved branding logos and background to redhat-logos-ipa-80.4: