Fix for -Werror=format-security, aarch64, ppc64le

This commit is contained in:
Yaakov Selkowitz 2014-07-18 18:04:23 -05:00
parent a5e9405e3e
commit c1fb55de2d
2 changed files with 32 additions and 2 deletions

View File

@ -0,0 +1,20 @@
--- a/src/db_file.c
+++ b/src/db_file.c
@@ -702,7 +702,7 @@ int db_write_byte_base64(byte*data,size_t len,FILE* file,int i,
}
if(tmpstr){
- retval=dofprintf(tmpstr);
+ retval=dofprintf("%s",tmpstr);
free(tmpstr);
return retval;
}else {
@@ -741,7 +741,7 @@ int db_write_time_base64(time_t i,FILE* file,int a)
tmpstr=encode_base64((byte *)ptr,strlen(ptr));
- retval=dofprintf(tmpstr);
+ retval=dofprintf("%s",tmpstr);
free(tmpstr);
free(ptr);

View File

@ -4,7 +4,7 @@
Summary: Intrusion detection environment
Name: aide
Version: 0.15.1
Release: 7%{?dist}
Release: 8%{?dist}
URL: http://sourceforge.net/projects/aide
License: GPLv2+
Group: Applications/System
@ -16,9 +16,14 @@ Source3: aide.logrotate
Patch1: aide-0.14-man.patch
# fix aide in FIPS mode
Patch2: aide-0.15.1-fipsfix.patch
# -Werror=format-security
Patch3: aide-0.15.1-format-security.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot-%(%{__id_u} -n)
BuildRequires: mktemp
BuildRequires: prelink elfutils-libelf-devel
BuildRequires: elfutils-libelf-devel
%ifnarch aarch64 ppc64le
BuildRequires: prelink
%endif
%if 0%{?rhel} == 0
Buildrequires: mhash-devel
%endif
@ -40,6 +45,7 @@ checker and intrusion detection program.
%setup -q
%patch1 -p1 -b .man
%patch2 -p1 -b .fipsfix
%patch3 -p1 -b .format
%build
%configure --with-config_file=%{_sysconfdir}/aide.conf \
@ -88,6 +94,10 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Fri Jul 18 2014 Yaakov Selkowitz <yselkowi@redhat.com> - 0.15.1-8
- Fix FTBFS with -Werror=format-security (#1036983, #1105942)
- Avoid prelink BR on aarch64, ppc64le (#924977, #1078476)
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild