rpms/aide/devel aide-0.12-selcon.patch, NONE, 1.1 aide.spec, 1.18, 1.19

Michael Schwendt (mschwendt) fedora-extras-commits at redhat.com
Sun Jul 22 15:13:46 UTC 2007


Author: mschwendt

Update of /cvs/extras/rpms/aide/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23421

Modified Files:
	aide.spec 
Added Files:
	aide-0.12-selcon.patch 
Log Message:
* 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.


aide-0.12-selcon.patch:

--- NEW FILE aide-0.12-selcon.patch ---
From: Steve Conklin <sconklin at redhat.com>
To: aide-devel at 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)




Index: aide.spec
===================================================================
RCS file: /cvs/extras/rpms/aide/devel/aide.spec,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- aide.spec	5 Jan 2007 22:29:56 -0000	1.18
+++ aide.spec	22 Jul 2007 15:13:14 -0000	1.19
@@ -7,7 +7,7 @@
 Summary: Intrusion detection environment
 Name: aide
 Version: 0.13.1
-Release: 1
+Release: 2
 URL: http://sourceforge.net/projects/aide
 License: GPL
 Group: Applications/System
@@ -16,6 +16,7 @@
 Source2: README.quickstart
 Source3: aide.conf.rhel
 Patch0: aide-0.13.1-manuals.patch
+Patch1: aide-0.12-selcon.patch
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot-%(%{__id_u} -n)
 Buildrequires: mhash-devel zlib-devel
 Buildrequires: flex bison
@@ -40,6 +41,7 @@
 # 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.conf!%{_sysconfdir}/aide.conf!' doc/aide.1.in
+%patch1 -p1 -b .selcon
 
 
 %build
@@ -80,6 +82,10 @@
 
 
 %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
 - Update to 0.13.1 release.
 




More information about the scm-commits mailing list