[Pkg-aide-maintainers] Bug#402785: aide: gzip_dbout broken in a new
way
Marc Haber
mh+debian-packages at zugschlus.de
Fri Dec 15 13:50:56 CET 2006
The attached dpatch (delivered from upstream) seems to solve this.
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835
-------------- next part --------------
#! /bin/sh /usr/share/dpatch/dpatch-run
## 20-lseek-402785.dpatch by Marc Haber <mh+debian-packages at zugschlus.de>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
diff -urNad trunk~/src/commandconf.c trunk/src/commandconf.c
--- trunk~/src/commandconf.c 2006-11-24 19:25:02.000000000 +0100
+++ trunk/src/commandconf.c 2006-12-15 10:07:29.000000000 +0100
@@ -1,8 +1,7 @@
/* aide, Advanced Intrusion Detection Environment
*
* Copyright (C) 1999,2000,2001,2002 Rami Lehti, Pablo Virolainen
- * $Header: /cvsroot/aide/aide/src/commandconf.c,v 1.17 2006/11/24 18:25:02 rvdb Exp $
- *
+ * $Header: /cvsroot/aide/aide/src/commandconf.c,v 1.19 2006/12/14 16:09:24 rvdb Exp $
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
@@ -334,9 +333,15 @@
if(c==(unsigned char)'\213'){
/* We got gzip header. */
error(255,"Got Gzip header. Handling..\n");
- fseek(*db_filep,0L,SEEK_SET);
+ lseek(fileno(*db_filep),0L,SEEK_SET);
*db_gzp=gzdopen(fileno(*db_filep),"rb");
c=gzgetc(*db_gzp);
+ error(255,"First character after gzip header is: %c(%#X)\n",c,c);
+ if(c==-1) {
+ int xx;
+ error(0,"Error reading gzipped file: %s\n",gzerror(*db_gzp,&xx));
+ abort();
+ }
}else {
/* False alarm */
ungetc(c,*db_filep);
More information about the Pkg-aide-maintainers
mailing list