File 0020-winbind-idmap-plugin-fix-detection.patch of Package sssd.22951
From 70dda07ce1dab6d02249b012e43b87fa9b2b9b86 Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose@redhat.com>
Date: Fri, 18 May 2018 21:34:44 +0200
Subject: [PATCH 2/8] winbind idmap plugin: fix detection
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Currently when compiling the detection code for the idmap interface
version only SMBCLIENT_CFLAGS are used. Since libsmbclient does not use
NTSTATUS the cflags do not contain '-DHAVE_IMMEDIATE_STRUCTURES=1' which
make NTSTATUS to a struct instead of an integer. Since Samba itself
might be complied with this define (it typically is) we have to make
sure we use it as well. Otherwise the test program might crash on
platforms where this change changes the calling convention as well.
Related to https://pagure.io/SSSD/sssd/issue/3741
Reviewed-by: Fabiano FidĂȘncio <fidencio@redhat.com>
(cherry picked from commit 095bbe17b25369b967e97162d945cb001a13029e)
---
src/external/samba.m4 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/external/samba.m4 b/src/external/samba.m4
index 610831bf0..794cac246 100644
--- a/src/external/samba.m4
+++ b/src/external/samba.m4
@@ -59,7 +59,7 @@ them. In this case, you will need to execute configure script with argument
sambalibdir="`$PKG_CONFIG --variable=libdir smbclient`"/samba
SAVE_CFLAGS=$CFLAGS
SAVE_LIBS=$LIBS
- CFLAGS="$CFLAGS $SMBCLIENT_CFLAGS -I/usr/include/samba-4.0"
+ CFLAGS="$CFLAGS $SMBCLIENT_CFLAGS $NDR_NBT_CFLAGS $NDR_KRB5PAC_CFLAGS -I/usr/include/samba-4.0"
LIBS="$LIBS -L${sambalibdir} -lidmap-samba4 -Wl,-rpath ${sambalibdir}"
AC_RUN_IFELSE(
[AC_LANG_SOURCE([
@@ -98,7 +98,7 @@ int main(void)
/* Check the versions we know about */
for (v = 5; v <= 6; v++) {
ret = smb_register_idmap(v, NULL, NULL);
- if (ret != NT_STATUS_OBJECT_TYPE_MISMATCH) {
+ if (!NT_STATUS_EQUAL(ret, NT_STATUS_OBJECT_TYPE_MISMATCH)) {
return v;
}
}
--
2.23.0