Hello community, here is the log from the commit of package libapr1 for openSUSE:Factory checked in at 2014-11-02 16:45:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libapr1 (Old) and /work/SRC/openSUSE:Factory/.libapr1.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libapr1" Changes: -------- --- /work/SRC/openSUSE:Factory/libapr1/libapr1.changes 2014-08-27 22:18:06.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libapr1.new/libapr1.changes 2014-11-02 16:46:01.000000000 +0100 @@ -1,0 +2,7 @@ +Sun Oct 19 18:52:04 UTC 2014 - crrodrig...@opensuse.org + +- apr-use-getrandom.patch Use the new getrandom() system call + in apr_generate_random_bytes() if the system call number + is defined and if the call is sucessful, fallback if otherwise. + +------------------------------------------------------------------- New: ---- apr-use-getrandom.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libapr1.spec ++++++ --- /var/tmp/diff_new_pack.g4wS0Q/_old 2014-11-02 16:46:03.000000000 +0100 +++ /var/tmp/diff_new_pack.g4wS0Q/_new 2014-11-02 16:46:03.000000000 +0100 @@ -35,6 +35,7 @@ Patch7: 0005-Backport-r1593612-from-1.6.patch Patch8: 0007-backport-r1604596-1604598-from-trunk.patch Patch9: 0009-Merge-r1610854-from-trunk.patch +Patch10: apr-use-getrandom.patch BuildRequires: doxygen BuildRequires: fdupes BuildRequires: libtool @@ -87,6 +88,7 @@ %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 # Do not put date to doxy content sed -i \ -e '4 iHTML_TIMESTAMP=NO' \ ++++++ apr-use-getrandom.patch ++++++ diff --git a/misc/unix/rand.c b/misc/unix/rand.c index c1e1e8f..e443d7e 100644 --- a/misc/unix/rand.c +++ b/misc/unix/rand.c @@ -43,6 +43,9 @@ #include <sys/uuid.h> #endif +#include <sys/syscall.h> +#include <linux/random.h> + #ifndef SHUT_RDWR #define SHUT_RDWR 2 #endif @@ -89,6 +92,12 @@ APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf, { #ifdef DEV_RANDOM +#ifdef __NR_getrandom + int r = TEMP_FAILURE_RETRY(syscall(__NR_getrandom, buf, length, 0)); + if(r != -1 && r == length) + return APR_SUCCESS; + /* If this fails for whatever reason..fallback to the old ways.. */ +#endif int fd = -1; /* On BSD/OS 4.1, /dev/random gives out 8 bytes at a time, then -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org