mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Changes to compat/getentropy files for,
no link to openssl if using nettle, and hence config.h for HAVE_NETTLE variable. compat definition of MAP_ANON, for older systems. ifdef stdint.h inclusion for older systems. ifdef sha2.h inclusion for older systems.
This commit is contained in:
parent
d085a0039b
commit
d63536289c
3 changed files with 27 additions and 0 deletions
|
|
@ -20,8 +20,11 @@
|
||||||
* http://man.openbsd.org/getentropy.2
|
* http://man.openbsd.org/getentropy.2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
/*
|
||||||
#define _POSIX_C_SOURCE 199309L
|
#define _POSIX_C_SOURCE 199309L
|
||||||
#define _GNU_SOURCE 1
|
#define _GNU_SOURCE 1
|
||||||
|
*/
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
|
@ -47,7 +50,15 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#ifndef HAVE_NETTLE
|
||||||
#include <openssl/sha.h>
|
#include <openssl/sha.h>
|
||||||
|
#else
|
||||||
|
#include <nettle/sha.h>
|
||||||
|
#define SHA512_CTX struct sha512_ctx
|
||||||
|
#define SHA512_Init(x) sha512_init(x)
|
||||||
|
#define SHA512_Update(x, b, s) sha512_update(x, s, b)
|
||||||
|
#define SHA512_Final(r, c) sha512_digest(c, SHA512_DIGEST_SIZE, r)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/random.h>
|
#include <linux/random.h>
|
||||||
|
|
@ -55,6 +66,9 @@
|
||||||
#include <sys/auxv.h>
|
#include <sys/auxv.h>
|
||||||
#endif
|
#endif
|
||||||
#include <sys/vfs.h>
|
#include <sys/vfs.h>
|
||||||
|
#ifndef MAP_ANON
|
||||||
|
#define MAP_ANON MAP_ANONYMOUS
|
||||||
|
#endif
|
||||||
|
|
||||||
#define REPEAT 5
|
#define REPEAT 5
|
||||||
#define min(a, b) (((a) < (b)) ? (a) : (b))
|
#define min(a, b) (((a) < (b)) ? (a) : (b))
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@
|
||||||
* http://man.openbsd.org/getentropy.2
|
* http://man.openbsd.org/getentropy.2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
|
@ -32,7 +33,9 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#ifdef HAVE_STDINT_H
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <link.h>
|
#include <link.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
|
|
@ -42,10 +45,14 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#ifdef HAVE_SYS_SHA2_H
|
||||||
#include <sys/sha2.h>
|
#include <sys/sha2.h>
|
||||||
#define SHA512_Init SHA512Init
|
#define SHA512_Init SHA512Init
|
||||||
#define SHA512_Update SHA512Update
|
#define SHA512_Update SHA512Update
|
||||||
#define SHA512_Final SHA512Final
|
#define SHA512_Final SHA512Final
|
||||||
|
#else
|
||||||
|
#include "openssl/sha.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <sys/vfs.h>
|
#include <sys/vfs.h>
|
||||||
#include <sys/statfs.h>
|
#include <sys/statfs.h>
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,12 @@
|
||||||
OpenBSD, no changes but makes the file, comments, identical.
|
OpenBSD, no changes but makes the file, comments, identical.
|
||||||
- Upgrade compat/getentropy_solaris.c to version 1.13 from OpenBSD.
|
- Upgrade compat/getentropy_solaris.c to version 1.13 from OpenBSD.
|
||||||
- Upgrade compat/getentropy_osx.c to version 1.12 from OpenBSD.
|
- Upgrade compat/getentropy_osx.c to version 1.12 from OpenBSD.
|
||||||
|
- Changes to compat/getentropy files for,
|
||||||
|
no link to openssl if using nettle, and hence config.h for
|
||||||
|
HAVE_NETTLE variable.
|
||||||
|
compat definition of MAP_ANON, for older systems.
|
||||||
|
ifdef stdint.h inclusion for older systems.
|
||||||
|
ifdef sha2.h inclusion for older systems.
|
||||||
|
|
||||||
19 November 2019: Wouter
|
19 November 2019: Wouter
|
||||||
- Fix CVE-2019-18934, shell execution in ipsecmod.
|
- Fix CVE-2019-18934, shell execution in ipsecmod.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue