[31384] in CVS-changelog-for-Kerberos-V5
krb5 commit: Check for sys/random.h
daemon@ATHENA.MIT.EDU (ghudson@mit.edu)
Mon Dec 2 13:39:13 2024
From: ghudson@mit.edu
To: cvs-krb5@mit.edu
Message-Id: <20241202183906.D78BD1019B5@krbdev.mit.edu>
Date: Mon, 2 Dec 2024 13:39:06 -0500 (EST)
MIME-Version: 1.0
Reply-To: krbdev@mit.edu
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu
https://github.com/krb5/krb5/commit/b43f4229758ff8e78897e03c386025cf4de3a200
commit b43f4229758ff8e78897e03c386025cf4de3a200
Author: Ken Hornstein <kenh@cmf.nrl.navy.mil>
Date: Fri Nov 29 16:32:06 2024 -0500
Check for sys/random.h
The function getentropy() is supported on newer versions of MacOS X,
but requires the include file sys/random.h. Check for that and include
it where getentropy() is used.
ticket: 9149
src/configure.ac | 2 +-
src/lib/crypto/krb/prng.c | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/configure.ac b/src/configure.ac
index 10a5d1a74..9d4e08a70 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -490,7 +490,7 @@ AC_SUBST(GETTIMEOFDAY_ST_OBJ)
AC_SUBST(EXTRA_SUPPORT_SYMS)
DECLARE_SYS_ERRLIST
-AC_CHECK_HEADERS(unistd.h paths.h regex.h regexpr.h fcntl.h memory.h ifaddrs.h sys/filio.h byteswap.h machine/endian.h machine/byte_order.h sys/bswap.h endian.h pwd.h arpa/inet.h alloca.h dlfcn.h limits.h)
+AC_CHECK_HEADERS(unistd.h paths.h regex.h regexpr.h fcntl.h memory.h ifaddrs.h sys/filio.h byteswap.h machine/endian.h machine/byte_order.h sys/bswap.h endian.h pwd.h arpa/inet.h alloca.h dlfcn.h limits.h sys/random.h)
AC_CHECK_HEADER(regexp.h, [], [],
[#define INIT char *sp = instring;
#define GETC() (*sp++)
diff --git a/src/lib/crypto/krb/prng.c b/src/lib/crypto/krb/prng.c
index a9c166815..4a6464558 100644
--- a/src/lib/crypto/krb/prng.c
+++ b/src/lib/crypto/krb/prng.c
@@ -56,6 +56,9 @@ get_os_entropy(unsigned char *buf, size_t len)
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
+#ifdef HAVE_SYS_RANDOM_H
+#include <sys/random.h>
+#endif
#ifdef __linux__
#include <sys/syscall.h>
#endif /* __linux__ */
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5