- Initialize libgcrypt correctly (#530485)

This commit is contained in:
Steve Grubb 2009-11-07 14:22:40 +00:00
parent 6863847ba5
commit af2e1397d3
2 changed files with 25 additions and 1 deletions

View File

@ -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);

View File

@ -7,7 +7,7 @@
Summary: Intrusion detection environment Summary: Intrusion detection environment
Name: aide Name: aide
Version: 0.13.1 Version: 0.13.1
Release: 12%{?dist} Release: 13%{?dist}
URL: http://sourceforge.net/projects/aide URL: http://sourceforge.net/projects/aide
License: GPLv2+ License: GPLv2+
Group: Applications/System Group: Applications/System
@ -18,6 +18,7 @@ Patch1: aide-0.13.1-contextsize.patch
Patch2: aide-0.12-dedosify.patch Patch2: aide-0.12-dedosify.patch
Patch3: aide-0.13.1-manuals.patch Patch3: aide-0.13.1-manuals.patch
Patch4: aide-0.13.1-prelink2.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) Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot-%(%{__id_u} -n)
BuildRequires: mktemp BuildRequires: mktemp
BuildRequires: prelink autoconf automake elfutils-libelf-devel BuildRequires: prelink autoconf automake elfutils-libelf-devel
@ -43,6 +44,7 @@ checker and intrusion detection program.
%patch2 -p1 -b .dedosify %patch2 -p1 -b .dedosify
%patch3 -p1 -b .manpages %patch3 -p1 -b .manpages
%patch4 -p1 -b .prelink %patch4 -p1 -b .prelink
%patch5 -p1 -b .libgcrypt
autoreconf autoreconf
%build %build
@ -85,6 +87,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Sat Nov 07 2009 Steve Grubb <sgrubb@redhat.com> - 0.13.1-13
- Initialize libgcrypt correctly (#530485)
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 0.13.1-12 * Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 0.13.1-12
- rebuilt with new audit - rebuilt with new audit