diff --git a/aide-0.13.1-libgrypt-init.patch b/aide-0.13.1-libgrypt-init.patch new file mode 100644 index 0000000..78828dd --- /dev/null +++ b/aide-0.13.1-libgrypt-init.patch @@ -0,0 +1,19 @@ +diff -up aide-0.13.1/src/md.c.gcryptinit aide-0.13.1/src/md.c +--- aide-0.13.1/src/md.c.gcryptinit 2009-10-23 04:48:19.000000000 +0200 ++++ aide-0.13.1/src/md.c 2009-10-23 04:53:09.000000000 +0200 +@@ -201,6 +201,15 @@ int init_md(struct md_container* md) { + #endif + #ifdef WITH_GCRYPT + error(255,"Gcrypt library initialization\n"); ++ /* ++ Initialize libgcrypt as per ++ http://www.gnupg.org/documentation/manuals/gcrypt/Initializing-the-library.html ++ */ ++ if(!gcry_check_version(GCRYPT_VERSION)) { ++ error(0,"libgcrypt version mismatch\n"); ++ exit(1); ++ } ++ gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); + if(gcry_md_open(&md->mdh,0,0)!=GPG_ERR_NO_ERROR){ + error(0,"gcrypt_md_open failed\n"); + exit(IO_ERROR); diff --git a/aide.spec b/aide.spec index 01aa6a3..8b26a2a 100644 --- a/aide.spec +++ b/aide.spec @@ -7,7 +7,7 @@ Summary: Intrusion detection environment Name: aide Version: 0.13.1 -Release: 12%{?dist} +Release: 13%{?dist} URL: http://sourceforge.net/projects/aide License: GPLv2+ Group: Applications/System @@ -18,10 +18,13 @@ Patch1: aide-0.13.1-contextsize.patch Patch2: aide-0.12-dedosify.patch Patch3: aide-0.13.1-manuals.patch Patch4: aide-0.13.1-prelink2.patch +Patch5: aide-0.13.1-libgrypt-init.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot-%(%{__id_u} -n) BuildRequires: mktemp BuildRequires: prelink autoconf automake elfutils-libelf-devel +%if 0%{?rhel} == 0 Buildrequires: mhash-devel +%endif Buildrequires: zlib-devel libgcrypt-devel Buildrequires: flex bison Buildrequires: libattr-devel libacl-devel libselinux-devel @@ -43,19 +46,22 @@ checker and intrusion detection program. %patch2 -p1 -b .dedosify %patch3 -p1 -b .manpages %patch4 -p1 -b .prelink +%patch5 -p1 -b .libgcrypt autoreconf %build %configure --with-config_file=%{_sysconfdir}/aide.conf \ --with-zlib \ --disable-static \ +%if 0%{?rhel} == 0 --with-mhash \ +%endif %{?_with_curl} %{?_without_curl} \ --with-selinux --with-posix-acl --with-audit \ --with-xattr \ --with-prelink -make %{?_smp_mflags} +make %install @@ -85,6 +91,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Nov 07 2009 Steve Grubb - 0.13.1-13 +- Initialize libgcrypt correctly (#530485) + * Fri Aug 21 2009 Tomas Mraz - 0.13.1-12 - rebuilt with new audit