diff --git a/prosody-0.9.9-urandom.patch b/prosody-0.9.9-urandom.patch new file mode 100644 index 0000000..b03b815 --- /dev/null +++ b/prosody-0.9.9-urandom.patch @@ -0,0 +1,29 @@ +Upstream: http://hg.prosody.im/0.9/rev/ad9e683b8f0b + +diff -r eed0632cd636 -r ad9e683b8f0b util/uuid.lua +--- a/util/uuid.lua Fri Jan 08 13:01:32 2016 +0000 ++++ b/util/uuid.lua Sun Jan 10 23:21:34 2016 +0100 +@@ -8,7 +8,7 @@ + + local error = error; + local round_up = math.ceil; +-local urandom, urandom_err = io.open("/dev/urandom", "r+"); ++local urandom, urandom_err = io.open("/dev/urandom", "r"); + + module "uuid" + +@@ -30,9 +30,7 @@ + return get_nibbles(8).."-"..get_nibbles(4).."-4"..get_nibbles(3).."-"..(get_twobits())..get_nibbles(3).."-"..get_nibbles(12); + end + +-function seed(x) +- urandom:write(x); +- urandom:flush(); ++function seed() + end + + return _M; + + + + diff --git a/prosody.spec b/prosody.spec index 8be9ded..69b649c 100644 --- a/prosody.spec +++ b/prosody.spec @@ -5,7 +5,7 @@ Summary: Flexible communications server for Jabber/XMPP Name: prosody Version: 0.9.9 -Release: 1%{?dist} +Release: 2%{?dist} License: MIT Group: System Environment/Daemons URL: https://prosody.im/ @@ -19,6 +19,7 @@ Source6: prosody-localhost.cfg.lua Source7: prosody-example.com.cfg.lua Patch0: prosody-0.9.8-config.patch Patch1: prosody-0.9.8-rhel5.patch +Patch2: prosody-0.9.9-urandom.patch BuildRequires: libidn-devel, openssl-devel Requires(pre): shadow-utils %if 0%{?rhel} > 6 || 0%{?fedora} > 17 @@ -58,8 +59,9 @@ added functionality, or prototype new protocols. %setup -q %patch0 -p1 -b .config %if 0%{?rhel} == 5 -%patch1 -p1 +%patch1 -p1 -b .rhel5 %endif +%patch2 -p1 -b .urandom %build # CFLAG -D_GNU_SOURCE requires fallocate() which requires GLIBC >= 2.10 @@ -220,6 +222,9 @@ fi %{_mandir}/man1/%{name}*.1* %changelog +* Tue Jan 12 2016 Robert Scheck 0.9.9-2 +- Added upstream patch to open /dev/urandom read-only + * Fri Jan 08 2016 Robert Scheck 0.9.9-1 - Upgrade to 0.9.9 (#1296983, #1296984)