From 36eee10956a7b8186a3cf51d0ac65ca81853e653 Mon Sep 17 00:00:00 2001 From: Brian Cox Date: Mon, 11 Apr 2016 20:29:37 -0700 Subject: [PATCH] Large file tweaks for e.g. 32-bit Linux; update ReadMe & ChangeLog again. --- ChangeLog | 13 +++++++++---- MAINTAINERS | 2 +- Packaging | 2 ++ ReadMe-2.4.3 | 3 ++- configure | 4 ++-- configure.in | 4 ++-- src/core/file_unix.cpp | 4 ++-- 7 files changed, 20 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index f53bcc9..8fad3c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,5 @@ -2016-03-25 Brian Cox - * Bumping version to 2.4.3.0 +2016-04-11 Brian Cox + * Bump version to 2.4.3.0 * Compilation fixes for gcc 4.7+ and LLVM/clang (see http://www.linuxfromscratch.org/blfs/view/svn/postlfs/tripwire.html ) * Absorb fixes from FreeBSD ports patchset @@ -7,12 +7,17 @@ * Fix handling of SHA hashes (with and without OpenSSL hash impl.) * Update GNU config.guess & config.sub to current versions * Compilation fixes for various and sundry Posix-esque platforms - (Mac OS X, OpenBSD, OpenSolaris, Cygwin, Minix 3.x, GNU/Hurd, MidnightBSD, Haiku, Syllable, SkyOS, Sortix) - * Added script to bump buildys file timestaps, to fix + (Mac OS X, OpenBSD, OpenSolaris, Cygwin, Minix 3.x, GNU/Hurd, MidnightBSD, Haiku, Syllable, SkyOS, Sortix, MiNT) + * Add script to bump buildys file timestaps, to fix spurious aclocal/automake errors on a fresh clone/untar/etc. * Update 'make dist' to bundle manpages & policy files * Replace broken RPM spec w/ 'Packaging' doc that explains where to get packaging stuff. * Add contributed files from 2.4.2.3 fork (see below) + * Fix large file support on e.g. 32-bit Linux + * Add '-h' option to display hashes as hex instead of base64 + * Add MAILFROMADDRESS config param (see twconfig man page) + * Use O_NONBLOCK, to avoid blocking on fifos & mandatory-locked files + * Report Solaris door & event port file types correctly 2014-01-01 Barry Allard diff --git a/MAINTAINERS b/MAINTAINERS index f631e99..dc2e6bc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1,6 +1,6 @@ Open Source Tripwire Maintainers: -Brian Cox (bcox [at] tripwire.com) +Brian Cox (bcox@tripwire.com) tripwire@frlinux.net (maintains the fork at github.com/frlinux/tripwire-open-source) Previous Maintainer: diff --git a/Packaging b/Packaging index acfc94a..c06d876 100644 --- a/Packaging +++ b/Packaging @@ -10,6 +10,8 @@ Packaging for Open Source Tripwire is maintained by various third parties: * Gentoo: https://packages.gentoo.org/packages/app-admin/tripwire + * Chef cookbook: https://github.com/rackspace-cookbooks/rackspace_tripwire + * FreeBSD Ports: http://svnweb.freebsd.org/ports/head/security/tripwire/ * FreshPorts (BSD): http://www.freshports.org/security/tripwire diff --git a/ReadMe-2.4.3 b/ReadMe-2.4.3 index 9d9d296..1be4cba 100644 --- a/ReadMe-2.4.3 +++ b/ReadMe-2.4.3 @@ -27,8 +27,9 @@ Linuxes - Ubuntu 14.0.4 (amd64) + gcc 4.x - RHEL 3.4 (Itanium) + gcc 3.4.3 - Alpine Linux 3.3.3 + gcc 5.3.0 -- Android 6.0 + gcc 4.9 +- Android 6.0 (arm) + gcc 4.9 - Raspbian 7 (wheezy) (armv6l) + gcc 4.6.3 +- openSuSE Tumbleweed (20160408) (i586) + gcc 5.3.1 OSX - Mac OS X 10.11 + LLVM 7.0.2 / clang-700.1.81 diff --git a/configure b/configure index 625c4a7..eb6ad0a 100755 --- a/configure +++ b/configure @@ -3251,8 +3251,8 @@ ac_config_headers="$ac_config_headers config.h" rm -f src/tripwire/syslog.h 2> /dev/null chmod 755 install-sh 2> /dev/null -CFLAGS=${CFLAGS:-"-O -pipe -Wall -Wno-non-virtual-dtor -D_LARGEFILE_SOURCE"} -CXXFLAGS=${CXXFLAGS:-"-O -pipe -Wall -Wno-non-virtual-dtor -D_LARGEFILE_SOURCE"} +CFLAGS=${CFLAGS:-"-O -pipe -Wall -Wno-non-virtual-dtor -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"} +CXXFLAGS=${CXXFLAGS:-"-O -pipe -Wall -Wno-non-virtual-dtor -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"} # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : diff --git a/configure.in b/configure.in index e3cb322..6fc575f 100644 --- a/configure.in +++ b/configure.in @@ -17,8 +17,8 @@ chmod 755 install-sh 2> /dev/null dnl ############### dnl Setup defaults dnl ############### -CFLAGS=${CFLAGS:-"-O -pipe -Wall -Wno-non-virtual-dtor -D_LARGEFILE_SOURCE"} -CXXFLAGS=${CXXFLAGS:-"-O -pipe -Wall -Wno-non-virtual-dtor -D_LARGEFILE_SOURCE"} +CFLAGS=${CFLAGS:-"-O -pipe -Wall -Wno-non-virtual-dtor -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"} +CXXFLAGS=${CXXFLAGS:-"-O -pipe -Wall -Wno-non-virtual-dtor -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"} dnl ##################### dnl Configuration options diff --git a/src/core/file_unix.cpp b/src/core/file_unix.cpp index ab031f3..df6969d 100755 --- a/src/core/file_unix.cpp +++ b/src/core/file_unix.cpp @@ -262,7 +262,7 @@ cFile::File_t cFile::Seek( File_t offset, SeekFrom From) const //throw(eFile) fprintf(stderr, "%d\n", blowupCount); #endif - if (fseek( mpData->mpCurrStream, offset, apiFrom ) != 0) + if (fseeko( mpData->mpCurrStream, offset, apiFrom ) != 0) { #ifdef _DEBUG cDebug d("cFile::Seek"); @@ -271,7 +271,7 @@ cFile::File_t cFile::Seek( File_t offset, SeekFrom From) const //throw(eFile) throw eFileSeek(); } - return ftell( mpData->mpCurrStream ); + return ftello(mpData->mpCurrStream); } ///////////////////////////////////////////////////////////////////////////