View | Details | Raw Unified | Return to bug 257866 | Differences between
and this patch

Collapse All | Expand All

(-)b/security/sssd/files/patch-configure.ac (+30 lines)
Lines 11-13 Link Here
11
 m4_include([src/build_macros.m4])
11
 m4_include([src/build_macros.m4])
12
 BUILD_WITH_SHARED_BUILD_DIR
12
 BUILD_WITH_SHARED_BUILD_DIR
13
 
13
 
14
@@ -62,4 +60,18 @@
15
16
 AM_CONDITIONAL([HAVE_PTHREAD], [test x"$HAVE_PTHREAD" != "x"])
17
+
18
+saved_CFLAGS="$CFLAGS"
19
+CFLAGS="-Werror"
20
+AC_COMPILE_IFELSE(
21
+    [AC_LANG_PROGRAM([[#include <string.h>]],
22
+        [[(void)mempcpy(NULL, NULL, 0);]])],
23
+    [AC_DEFINE([HAVE_MEMPCPY], [1], [mempcpy() available])
24
+     HAVE_MEMPCPY=1
25
+    ],
26
+    [AC_MSG_WARN([mempcpy() not found, will use private implementation])])
27
+
28
+CFLAGS="$saved_CFLAGS"
29
+
30
+AM_CONDITIONAL([HAVE_MEMPCPY], [test x"$HAVE_MEMPCPY" != "x"])
31
32
 # Check library for the timer_create function
33
@@ -356,8 +358,8 @@ them please use argument --without-python3-bindings wh
34
     AM_CHECK_PYTHON_HEADERS([],
35
                             AC_MSG_ERROR([Could not find python3 headers]))
36
37
-    AC_SUBST([py3execdir], [$pyexecdir])
38
-    AC_SUBST([python3dir], [$pythondir])
39
+    AC_SUBST([py3execdir], [$(eval echo $pyexecdir)])
40
+    AC_SUBST([python3dir], [$(eval echo $pythondir)])
41
     AC_SUBST([PYTHON3_CFLAGS], [$PYTHON_CFLAGS])
42
     AC_SUBST([PYTHON3_LIBS], [$PYTHON_LIBS])
43
     AC_SUBST([PYTHON3_INCLUDES], [$PYTHON_INCLUDES])
(-)b/security/sssd/files/patch-src__util__crypto__libcrypto__crypto_sha512crypt.c (-1 / +3 lines)
Lines 2-16 Link Here
2
index 2275ccd96..c1e418917 100644
2
index 2275ccd96..c1e418917 100644
3
--- src/util/crypto/libcrypto/crypto_sha512crypt.c
3
--- src/util/crypto/libcrypto/crypto_sha512crypt.c
4
+++ src/util/crypto/libcrypto/crypto_sha512crypt.c
4
+++ src/util/crypto/libcrypto/crypto_sha512crypt.c
5
@@ -30,6 +30,11 @@
5
@@ -30,6 +30,13 @@
6
 
6
 
7
 #include "sss_openssl.h"
7
 #include "sss_openssl.h"
8
 
8
 
9
+#ifndef HAVE_MEMPCPY
9
+void *
10
+void *
10
+mempcpy (void *dest, const void *src, size_t n)
11
+mempcpy (void *dest, const void *src, size_t n)
11
+{
12
+{
12
+  return (char *) memcpy (dest, src, n) + n;
13
+  return (char *) memcpy (dest, src, n) + n;
13
+}
14
+}
15
+#endif /* HAVE_MEMPCPY */
14
 
16
 
15
 /* Define our magic string to mark salt for SHA512 "encryption" replacement. */
17
 /* Define our magic string to mark salt for SHA512 "encryption" replacement. */
16
 const char sha512_salt_prefix[] = "$6$";
18
 const char sha512_salt_prefix[] = "$6$";
(-)b/security/sssd/files/patch-src__util__crypto__nss__nss_sha512crypt.c (-1 / +3 lines)
Lines 2-16 Link Here
2
index 4d0594d9f..49801222d 100644
2
index 4d0594d9f..49801222d 100644
3
--- src/util/crypto/nss/nss_sha512crypt.c
3
--- src/util/crypto/nss/nss_sha512crypt.c
4
+++ src/util/crypto/nss/nss_sha512crypt.c
4
+++ src/util/crypto/nss/nss_sha512crypt.c
5
@@ -29,6 +29,12 @@
5
@@ -29,6 +29,14 @@
6
 #include <sechash.h>
6
 #include <sechash.h>
7
 #include <pk11func.h>
7
 #include <pk11func.h>
8
 
8
 
9
+#ifndef HAVE_MEMPCPY
9
+static void *
10
+static void *
10
+mempcpy (void *dest, const void *src, size_t n)
11
+mempcpy (void *dest, const void *src, size_t n)
11
+{
12
+{
12
+  return (char *) memcpy (dest, src, n) + n;
13
+  return (char *) memcpy (dest, src, n) + n;
13
+}
14
+}
15
+#endif /* HAVE_MEMPCPY */
14
+
16
+
15
 /* Define our magic string to mark salt for SHA512 "encryption" replacement. */
17
 /* Define our magic string to mark salt for SHA512 "encryption" replacement. */
16
 const char sha512_salt_prefix[] = "$6$";
18
 const char sha512_salt_prefix[] = "$6$";

Return to bug 257866