- Apply Steve Conklin's patch to increase displayed portion of selinux
context.
This commit is contained in:
parent
596fd89aea
commit
67d0a64669
50
aide-0.12-selcon.patch
Normal file
50
aide-0.12-selcon.patch
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
From: Steve Conklin <sconklin@redhat.com>
|
||||||
|
To: aide-devel@lists.sourceforge.net
|
||||||
|
|
||||||
|
Only the first 32 characters of the selinux context was displayed, which
|
||||||
|
often isn't enough to see what changed.
|
||||||
|
This patch increases the displayed length to 128 characters for selinux
|
||||||
|
contexts and also for link names.
|
||||||
|
|
||||||
|
--- aide-0.12-orig/src/compare_db.c 2007-05-28 13:30:31.000000000 -0500
|
||||||
|
+++ aide-0.12/src/compare_db.c 2007-05-28 13:31:09.000000000 -0500
|
||||||
|
@@ -54,9 +54,10 @@
|
||||||
|
const int old_col = 12;
|
||||||
|
const int new_col = 40;
|
||||||
|
|
||||||
|
-const int part_len = 33; /* usable length of line[] */
|
||||||
|
-char oline[33];
|
||||||
|
-char nline[33];
|
||||||
|
+const int part_len = 33; /* usable length of line[] for most purposes */
|
||||||
|
+const int long_part_len = 129; /* length of line[] for link names and selinux contexts */
|
||||||
|
+char oline[129];
|
||||||
|
+char nline[129];
|
||||||
|
const char* entry_format= " %-9s: %-33s, %s\n";
|
||||||
|
const char* entry_format_justnew=" %-9s: %-33c %s\n";
|
||||||
|
/*************/
|
||||||
|
@@ -383,17 +384,17 @@ void print_str_changes(char*old,char*new
|
||||||
|
|
||||||
|
if(old==NULL){
|
||||||
|
if(new!=NULL){
|
||||||
|
- snprintf(oline,part_len,"<NULL>");
|
||||||
|
- snprintf(nline,part_len,"%s",new);
|
||||||
|
+ snprintf(oline,long_part_len,"<NULL>");
|
||||||
|
+ snprintf(nline,long_part_len,"%s",new);
|
||||||
|
ok = 1;
|
||||||
|
}
|
||||||
|
} else if(new==NULL){
|
||||||
|
- snprintf(oline,part_len,"%s",old);
|
||||||
|
- snprintf(nline,part_len,"<NULL>");
|
||||||
|
+ snprintf(oline,long_part_len,"%s",old);
|
||||||
|
+ snprintf(nline,long_part_len,"<NULL>");
|
||||||
|
ok = 1;
|
||||||
|
} else if(strcmp(old,new)!=0){
|
||||||
|
- snprintf(oline,part_len,"%s",old);
|
||||||
|
- snprintf(nline,part_len,"%s",new);
|
||||||
|
+ snprintf(oline,long_part_len,"%s",old);
|
||||||
|
+ snprintf(nline,long_part_len,"%s",new);
|
||||||
|
ok = 1;
|
||||||
|
}
|
||||||
|
if(ok)
|
||||||
|
|
||||||
|
|
@ -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: 1
|
Release: 2
|
||||||
URL: http://sourceforge.net/projects/aide
|
URL: http://sourceforge.net/projects/aide
|
||||||
License: GPL
|
License: GPL
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
@ -16,6 +16,7 @@ Source1: aide.conf
|
|||||||
Source2: README.quickstart
|
Source2: README.quickstart
|
||||||
Source3: aide.conf.rhel
|
Source3: aide.conf.rhel
|
||||||
Patch0: aide-0.13.1-manuals.patch
|
Patch0: aide-0.13.1-manuals.patch
|
||||||
|
Patch1: aide-0.12-selcon.patch
|
||||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot-%(%{__id_u} -n)
|
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot-%(%{__id_u} -n)
|
||||||
Buildrequires: mhash-devel zlib-devel
|
Buildrequires: mhash-devel zlib-devel
|
||||||
Buildrequires: flex bison
|
Buildrequires: flex bison
|
||||||
@ -40,6 +41,7 @@ checker and intrusion detection program.
|
|||||||
# Adjust default paths in manual (not as safe as the patch).
|
# Adjust default paths in manual (not as safe as the patch).
|
||||||
#sed -i -e 's!@sysconfdir@/aide.db\(.new\)\?!%{_localstatedir}/lib/aide/aide.db\1.gz!' doc/aide.1.in
|
#sed -i -e 's!@sysconfdir@/aide.db\(.new\)\?!%{_localstatedir}/lib/aide/aide.db\1.gz!' doc/aide.1.in
|
||||||
#sed -i -e 's!@sysconfdir@/aide.conf!%{_sysconfdir}/aide.conf!' doc/aide.1.in
|
#sed -i -e 's!@sysconfdir@/aide.conf!%{_sysconfdir}/aide.conf!' doc/aide.1.in
|
||||||
|
%patch1 -p1 -b .selcon
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -80,6 +82,10 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Jul 22 2007 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.13.1-2
|
||||||
|
- Apply Steve Conklin's patch to increase displayed portion of
|
||||||
|
selinux context.
|
||||||
|
|
||||||
* Sun Dec 17 2006 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.13.1-1
|
* Sun Dec 17 2006 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.13.1-1
|
||||||
- Update to 0.13.1 release.
|
- Update to 0.13.1 release.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user