Relates: RHEL-33645 - Rebase Samba to the latest 4.20.x release

This commit is contained in:
Alexey Tikhonov 2024-04-29 12:56:30 +02:00
parent 9cde1a03b4
commit 983f2cbb3e
2 changed files with 55 additions and 0 deletions

View File

@ -0,0 +1,54 @@
From 1bf51929a48b84d62ac54f2a42f17e7fbffe1612 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd@samba.org>
Date: Wed, 31 Jan 2024 10:42:40 +0100
Subject: [PATCH] Fix the build with Samba 4.20
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Sumit Bose <sbose@redhat.com>
---
src/external/samba.m4 | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/external/samba.m4 b/src/external/samba.m4
index 49c6db8d2..06804c130 100644
--- a/src/external/samba.m4
+++ b/src/external/samba.m4
@@ -4,6 +4,7 @@ AC_SUBST(SMBCLIENT_CFLAGS)
AC_SUBST(SMBCLIENT_LIBS)
AC_SUBST(NDR_KRB5PAC_CFLAGS)
AC_SUBST(NDR_KRB5PAC_LIBS)
+AC_SUBST(IDMAP_SAMBA_LIBS)
if test x"$with_samba" = xyes; then
PKG_CHECK_MODULES(NDR_NBT, ndr_nbt, ,
@@ -52,13 +53,21 @@ with argument --without-samba
AC_MSG_ERROR([Illegal value -$with_smb_idmap_interface_version- for option --with-smb-idmap-interface-version])
fi
else
-
- AC_MSG_CHECKING([Samba's idmap plugin interface version])
sambalibdir="`$PKG_CONFIG --variable=libdir smbclient`"/samba
+ AC_MSG_CHECKING([Samba's idmap library])
+ if test -f "${sambalibdir}/libidmap-private-samba.so"; then
+ IDMAP_SAMBA_LIBS=idmap-private-samba
+ elif test -f "${sambalibdir}/libidmap-samba4.so"; then
+ IDMAP_SAMBA_LIBS=idmap-samba4
+ else
+ AC_MSG_ERROR([Cannot find private idmap-samba library])
+ fi
+ AC_MSG_RESULT([found: $IDMAP_SAMBA_LIBS])
+ AC_MSG_CHECKING([Samba's idmap plugin interface version])
SAVE_CFLAGS=$CFLAGS
SAVE_LIBS=$LIBS
CFLAGS="$CFLAGS $SMBCLIENT_CFLAGS $NDR_NBT_CFLAGS $NDR_KRB5PAC_CFLAGS"
- LIBS="$LIBS -L${sambalibdir} -lidmap-samba4 -Wl,-rpath ${sambalibdir}"
+ LIBS="$LIBS -L${sambalibdir} -l${IDMAP_SAMBA_LIBS} -Wl,-rpath ${sambalibdir}"
AC_RUN_IFELSE(
[AC_LANG_SOURCE([
#include <stdlib.h>
--
2.44.0

View File

@ -49,6 +49,7 @@ Patch0012: 0012-pam_sss-prefer-Smartcard-authentication.patch
Patch0013: 0013-pam-fix-storing-auth-types-for-offline-auth.patch
Patch0014: 0014-ad-gpo-use-hash-to-store-intermediate-results.patch
Patch0015: 0015-tests-Drop-extensions-from-openssl-command-if-there-.patch
Patch0016: 0016-Fix-the-build-with-Samba-4.20.patch
### Dependencies ###