Merge pull request #16 from Tripwire/dev/2.4.3.3

Open Source Tripwire 2.4.3.3 update
This commit is contained in:
Brian Cox 2017-02-21 20:10:02 -08:00 committed by GitHub
commit 2617c9acec
42 changed files with 159 additions and 109 deletions

View File

@ -1,3 +1,10 @@
2017-02-21 Brian Cox <bcox@tripwire.com>
* Bump version to 2.4.3.3
* Run Clang static analyzer & fix some of its quibbles
* Fix compilation error on Alpine Linux 3.x
* Fix file permissions on a couple of source files
* Fix some errors w/ make install/uninstall/dist
2017-01-15 Brian Cox <bcox@tripwire.com>
* Bump version to 2.4.3.2
* DOS/DJGPP platform support.

View File

@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS = foreign no-dependencies
SUBDIRS = man src
EXTRA_DIST = COMMERCIAL MAINTAINERS TRADEMARK LICENSE Packaging README-2.4.3 README.md autogen.sh autogen.sh.README touchconfig.sh contrib policy installer
EXTRA_DIST = COMMERCIAL MAINTAINERS TRADEMARK LICENSE Packaging ReadMe-2.4.3 README.md autogen.sh autogen.sh.README touchconfig.sh contrib policy installer
install-data-hook:
prefix="$(prefix)" sysconfdir="$(sysconfdir)" \

View File

@ -307,6 +307,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@ -321,7 +322,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign no-dependencies
SUBDIRS = man src
EXTRA_DIST = COMMERCIAL MAINTAINERS TRADEMARK LICENSE Packaging README-2.4.3 README.md autogen.sh autogen.sh.README touchconfig.sh contrib policy installer
EXTRA_DIST = COMMERCIAL MAINTAINERS TRADEMARK LICENSE Packaging ReadMe-2.4.3 README.md autogen.sh autogen.sh.README touchconfig.sh contrib policy installer
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive

36
configure vendored
View File

@ -1,7 +1,7 @@
#! /bin/sh
# From configure.ac Revision: 2.4.3.2 .
# From configure.ac Revision: 2.4.3.3 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for tripwire 2.4.3.2.
# Generated by GNU Autoconf 2.69 for tripwire 2.4.3.3.
#
# Report bugs to <https://github.com/Tripwire/tripwire-open-source/issues>.
#
@ -584,8 +584,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='tripwire'
PACKAGE_TARNAME='tripwire'
PACKAGE_VERSION='2.4.3.2'
PACKAGE_STRING='tripwire 2.4.3.2'
PACKAGE_VERSION='2.4.3.3'
PACKAGE_STRING='tripwire 2.4.3.3'
PACKAGE_BUGREPORT='https://github.com/Tripwire/tripwire-open-source/issues'
PACKAGE_URL='https://github.com/Tripwire/tripwire-open-source'
@ -724,6 +724,7 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
@ -808,6 +809,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@ -1060,6 +1062,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-runstatedir | --runstatedir | --runstatedi | --runstated \
| --runstate | --runstat | --runsta | --runst | --runs \
| --run | --ru | --r)
ac_prev=runstatedir ;;
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
| --run=* | --ru=* | --r=*)
runstatedir=$ac_optarg ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@ -1197,7 +1208,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir
libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@ -1310,7 +1321,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures tripwire 2.4.3.2 to adapt to many kinds of systems.
\`configure' configures tripwire 2.4.3.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1350,6 +1361,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@ -1381,7 +1393,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of tripwire 2.4.3.2:";;
short | recursive ) echo "Configuration of tripwire 2.4.3.3:";;
esac
cat <<\_ACEOF
@ -1492,7 +1504,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
tripwire configure 2.4.3.2
tripwire configure 2.4.3.3
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@ -2379,7 +2391,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by tripwire $as_me 2.4.3.2, which was
It was created by tripwire $as_me 2.4.3.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@ -3353,7 +3365,7 @@ fi
# Define the identity of the package.
PACKAGE='tripwire'
VERSION='2.4.3.2'
VERSION='2.4.3.3'
cat >>confdefs.h <<_ACEOF
@ -7621,7 +7633,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by tripwire $as_me 2.4.3.2, which was
This file was extended by tripwire $as_me 2.4.3.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -7688,7 +7700,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
tripwire config.status 2.4.3.2
tripwire config.status 2.4.3.3
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

View File

@ -2,14 +2,14 @@ dnl Process this file with autoconf to produce a configure script.
dnl
dnl
AC_INIT([tripwire], [2.4.3.2], [https://github.com/Tripwire/tripwire-open-source/issues], [tripwire], [https://github.com/Tripwire/tripwire-open-source])
AC_INIT([tripwire], [2.4.3.3], [https://github.com/Tripwire/tripwire-open-source/issues], [tripwire], [https://github.com/Tripwire/tripwire-open-source])
AC_CONFIG_SRCDIR([src/tw/tw.cpp])
AC_CANONICAL_TARGET([])
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
AC_COPYRIGHT([The developer of the original code and/or files is Tripwire, Inc. Portions created by Tripwire, Inc. are copyright 2000-2017 Tripwire, Inc. Tripwire is a registered trademark of Tripwire, Inc. All rights reserved.])
AC_REVISION([$Revision: 2.4.3.2 $])
AC_REVISION([$Revision: 2.4.3.3 $])
dnl #################################
dnl Cleanup Cruft Leftover From Patch

View File

@ -569,10 +569,10 @@ echo
#f1=' ff=$README ; d="" ; dd=$TWDOCS ; rr=0444 '
#f2=' ff=$REL_NOTES ; d="" ; dd=$TWDOCS ; rr=0444 '
f3=' ff=$TWLICENSEFILE ; d="" ; dd=$TWDOCS ; rr=0444 '
#f4=' ff=tripwire ; d="/bin" ; dd=$TWBIN ; rr=0550 '
#f5=' ff=twadmin ; d="/bin" ; dd=$TWBIN ; rr=0550 '
#f6=' ff=twprint ; d="/bin" ; dd=$TWBIN ; rr=0550 '
#f7=' ff=siggen ; d="/bin" ; dd=$TWBIN ; rr=0550 '
f4=' ff=tripwire ; d="/bin" ; dd=$TWBIN ; rr=0550 '
f5=' ff=twadmin ; d="/bin" ; dd=$TWBIN ; rr=0550 '
f6=' ff=twprint ; d="/bin" ; dd=$TWBIN ; rr=0550 '
f7=' ff=siggen ; d="/bin" ; dd=$TWBIN ; rr=0550 '
f8=' ff=TRADEMARK ; d="" ; dd=$TWDOCS ; rr=0444 '
f9=' ff=policyguide.txt ; d="/policy" ; dd=$TWDOCS ; rr=0444 '
f10=' ff=${POLICYSRC} ; d="/policy" ; dd=$TWPOLICY ; rr=0640 '
@ -586,7 +586,7 @@ f10=' ff=${POLICYSRC} ; d="/policy" ; dd=$TWPOLICY ; rr=0640 '
#f18=' ff=twprint.8 ; d="/man/man8" ; dd=$TWMAN/man8 ; rr=0444 '
# Binaries and manpages are already installed by the install target
loosefiles="f3 f8 f9 f10"
loosefiles="f3 f4 f5 f6 f7 f8 f9 f10"
for i in $loosefiles; do
eval "eval \"\$$i\""

View File

@ -284,6 +284,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@

View File

@ -1,3 +1,2 @@
AUTOMAKE_OPTIONS = foreign no-dependencies
man_MANS = twconfig.4 twpolicy.4
dist_man_MANS = twconfig.4 twpolicy.4
dist_man_MANS = twconfig.4 twpolicy.4

View File

@ -150,7 +150,7 @@ am__uninstall_files_from_dir = { \
man4dir = $(mandir)/man4
am__installdirs = "$(DESTDIR)$(man4dir)"
NROFF = nroff
MANS = $(dist_man_MANS) $(man_MANS)
MANS = $(dist_man_MANS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \
$(top_srcdir)/mkinstalldirs
@ -256,6 +256,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@ -269,7 +270,6 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign no-dependencies
man_MANS = twconfig.4 twpolicy.4
dist_man_MANS = twconfig.4 twpolicy.4
all: all-am
@ -303,10 +303,10 @@ $(top_srcdir)/configure: $(am__configure_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-man4: $(dist_man_MANS) $(man_MANS)
install-man4: $(dist_man_MANS)
@$(NORMAL_INSTALL)
@list1=''; \
list2='$(dist_man_MANS) $(man_MANS)'; \
list2='$(dist_man_MANS)'; \
test -n "$(man4dir)" \
&& test -n "`echo $$list1$$list2`" \
|| exit 0; \
@ -341,7 +341,7 @@ uninstall-man4:
@$(NORMAL_UNINSTALL)
@list=''; test -n "$(man4dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
l2='$(dist_man_MANS) $(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.4[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^4][0-9a-z]*$$,4,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \

View File

@ -1,3 +1,2 @@
AUTOMAKE_OPTIONS = foreign no-dependencies
man_MANS = twfiles.5
dist_man_MANS = twfiles.5
dist_man_MANS = twfiles.5

View File

@ -150,7 +150,7 @@ am__uninstall_files_from_dir = { \
man5dir = $(mandir)/man5
am__installdirs = "$(DESTDIR)$(man5dir)"
NROFF = nroff
MANS = $(dist_man_MANS) $(man_MANS)
MANS = $(dist_man_MANS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \
$(top_srcdir)/mkinstalldirs
@ -256,6 +256,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@ -269,7 +270,6 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign no-dependencies
man_MANS = twfiles.5
dist_man_MANS = twfiles.5
all: all-am
@ -303,10 +303,10 @@ $(top_srcdir)/configure: $(am__configure_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-man5: $(dist_man_MANS) $(man_MANS)
install-man5: $(dist_man_MANS)
@$(NORMAL_INSTALL)
@list1=''; \
list2='$(dist_man_MANS) $(man_MANS)'; \
list2='$(dist_man_MANS)'; \
test -n "$(man5dir)" \
&& test -n "`echo $$list1$$list2`" \
|| exit 0; \
@ -341,7 +341,7 @@ uninstall-man5:
@$(NORMAL_UNINSTALL)
@list=''; test -n "$(man5dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
l2='$(dist_man_MANS) $(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.5[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \

View File

@ -1,3 +1,2 @@
AUTOMAKE_OPTIONS = foreign no-dependencies
man_MANS = siggen.8 tripwire.8 twadmin.8 twintro.8 twprint.8
dist_man_MANS = siggen.8 tripwire.8 twadmin.8 twintro.8 twprint.8
dist_man_MANS = siggen.8 tripwire.8 twadmin.8 twintro.8 twprint.8

View File

@ -150,7 +150,7 @@ am__uninstall_files_from_dir = { \
man8dir = $(mandir)/man8
am__installdirs = "$(DESTDIR)$(man8dir)"
NROFF = nroff
MANS = $(dist_man_MANS) $(man_MANS)
MANS = $(dist_man_MANS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \
$(top_srcdir)/mkinstalldirs
@ -256,6 +256,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@ -269,7 +270,6 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign no-dependencies
man_MANS = siggen.8 tripwire.8 twadmin.8 twintro.8 twprint.8
dist_man_MANS = siggen.8 tripwire.8 twadmin.8 twintro.8 twprint.8
all: all-am
@ -303,10 +303,10 @@ $(top_srcdir)/configure: $(am__configure_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-man8: $(dist_man_MANS) $(man_MANS)
install-man8: $(dist_man_MANS)
@$(NORMAL_INSTALL)
@list1=''; \
list2='$(dist_man_MANS) $(man_MANS)'; \
list2='$(dist_man_MANS)'; \
test -n "$(man8dir)" \
&& test -n "`echo $$list1$$list2`" \
|| exit 0; \
@ -341,7 +341,7 @@ uninstall-man8:
@$(NORMAL_UNINSTALL)
@list=''; test -n "$(man8dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
l2='$(dist_man_MANS) $(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.8[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \

View File

@ -2,3 +2,9 @@ SUBDIRS = cryptlib core db fco fs tw twcrypto twparser util
SUBDIRS+= twprint twadmin siggen tripwire twtest
EXTRA_DIST = buildnum.h buildnum.txt buildnuminc.pl dep_addprefix.pl rmcr.pl check_st.pl prime.pl parser test-harness core/md5.cpp core/sha.cpp
install:
true
uninstall:
true

View File

@ -282,6 +282,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@ -489,10 +490,8 @@ check: check-recursive
all-am: Makefile
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
@ -602,6 +601,12 @@ uninstall-am:
.PRECIOUS: Makefile
install:
true
uninstall:
true
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -314,6 +314,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@

62
src/core/codeconvert.cpp Executable file → Normal file
View File

@ -1323,7 +1323,9 @@ cWcharIs32BitUcs2Converterer::Convert(
throw eConverterFatal( TSS_GetString( cCore, core::STR_ERR_ISNULL ) );
// cast our dbchar_t to wchar_t's first
ntwcs_t pwzBuffer = new wchar_t[ nCount + 1 ];
std::vector<wchar_t> buf(nCount+1);
wchar_t* pwzBuffer = &buf[0];
for( size_t n = 0; n < nCount; n++ )
pwzBuffer[n] = pwz[n];
pwzBuffer[nCount] = 0x00; // null terminate
@ -1358,7 +1360,8 @@ cWcharIs32BitUcs2Converterer::Convert(
throw eConverterFatal( TSS_GetString( cCore, core::STR_ERR_ISNULL ) );
// mb to wc to a buffer of wide chars then....
wchar_t* pwzBuffer = new wchar_t[ nCount ];
std::vector<wchar_t> buf(nCount);
wchar_t* pwzBuffer = &buf[0];
int nConv = tss_mbstowcs( pwzBuffer, pbz, nCount );
if ( nConv == -1 )
@ -1451,22 +1454,26 @@ cGoodEnoughConverterer::Convert(
throw eConverterFatal( TSS_GetString( cCore, core::STR_ERR_ISNULL ) );
char* at = pbz;
const dbchar_t* dat = pwz;
while ( *dat )
if (pwz)
{
if( *dat > 0xFF )
const dbchar_t* dat = pwz;
while ( *dat )
{
*at = cConvertUtil::ConvertNonChar( *dat );
if( *dat > 0xFF )
{
*at = cConvertUtil::ConvertNonChar( *dat );
}
else
{
*at = (char)*dat;
}
at++;
dat++;
}
else
{
*at = (char)*dat;
}
at++;
dat++;
}
*at = 0x00;
return( (size_t)at - (size_t)pbz );
@ -1481,23 +1488,26 @@ cGoodEnoughConverterer::Convert(
if ( pwz == 0 || ( pbz == 0 && nBytes ) )
throw eConverterFatal( TSS_GetString( cCore, core::STR_ERR_ISNULL ) );
const char* at = pbz;
dbchar_t* dat = pwz;
while ( *at )
if (pbz)
{
if( (unsigned char)*at > (unsigned char)0x7Fu )
const char* at = pbz;
while ( *at )
{
*dat = cConvertUtil::ConvertNonChar( *at );
}
else
{
*dat = (uint16)(unsigned char)*at;
}
if( (unsigned char)*at > (unsigned char)0x7Fu )
{
*dat = cConvertUtil::ConvertNonChar( *at );
}
else
{
*dat = (uint16)(unsigned char)*at;
}
dat++;
at++;
dat++;
at++;
}
}
*dat = 0x0000;
return( ( (size_t)dat - (size_t)pwz ) / sizeof( dbchar_t ) );

View File

@ -69,6 +69,10 @@
#if HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#if HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#endif
//=========================================================================

View File

@ -1105,8 +1105,8 @@ bool util_GetNextPathElement( const TSTRING& strPathC, TSTRING& strElem, int ind
TSTRING strPath = strPathC; // writable local version
bool fMoreSeps = true;
TSTRING::size_type firstSep, nextSep, nextNonSep;
firstSep = nextSep = nextNonSep = (TSTRING::size_type)-1;
TSTRING::size_type nextSep, nextNonSep;
nextSep = nextNonSep = (TSTRING::size_type)-1;
for( int i = 0; i <= index && fMoreSeps; i++ )
{
// go past leading separators

View File

@ -303,6 +303,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@

View File

@ -300,6 +300,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@

0
src/db/hierdatabase.cpp Executable file → Normal file
View File

View File

@ -308,6 +308,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@

View File

@ -260,8 +260,12 @@ int cFCOPropVector::SetSize(int max)
}
else //mpBuf!=NULL && max>msBitlength
{
(*mpBuf).resize (((max/msBitlength)+1), 0);
return mSize = ((*mpBuf).capacity() * msBitlength);
if (mpBuf)
{
(*mpBuf).resize (((max/msBitlength)+1), 0);
mSize = ((*mpBuf).capacity() * msBitlength);
}
return mSize;
}
}

View File

@ -303,6 +303,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@

View File

@ -295,6 +295,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@

View File

@ -299,6 +299,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@

View File

@ -353,12 +353,15 @@ void cIntegrityCheck::ProcessDir( cDbDataSourceIter dbIter, iFCODataSourceIter*
if( dbIter.Done() )
{
ASSERT( pIter != 0);
d.TraceDetail( "Examining <done> and %s\n", pIter->GetName().AsString().c_str() );
//
// these are all new entries, add them to the "Added" set...
//
ProcessAddedFCO( dbIter, pIter );
pIter->Next();
if (pIter)
{
d.TraceDetail( "Examining <done> and %s\n", pIter->GetName().AsString().c_str() );
//
// these are all new entries, add them to the "Added" set...
//
ProcessAddedFCO( dbIter, pIter );
pIter->Next();
}
}
else if( ! pIter )
{

View File

@ -273,10 +273,6 @@ private:
void SendInit();// throw (eMailMessageError)
// opens a pipe to sendmail and writes the header.
FILE* GetFilePointer() const;
// returns a pointer to the current file pointer. Only valid between
// SendInit() and SendFinit()
void SendFinit(); //throw (eMailMessageError)
// closes the file descriptor, sending the rest of the message

View File

@ -80,8 +80,7 @@ bool cPipedMailMessage::Send()
SendInit();
FILE* sendPipe = GetFilePointer();
ASSERT( sendPipe != 0 );
ASSERT( mpFile != 0 );
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Get Body and Attachments
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -213,8 +212,3 @@ void cPipedMailMessage::SendFinit() //throw ( eMailMessageError )
}
FILE* cPipedMailMessage::GetFilePointer() const
{
return mpFile;
}

View File

@ -306,6 +306,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@

View File

@ -450,6 +450,7 @@ void cDbDebug::OutputResults( void )
// Begin code for manipulating Database -- This is just a straight port from the DbExplore code. It's presence is
// purely for convenience, and for debugging this class.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/*
static inline bool IsSpace( TCHAR c )
{
return ( (c == _T(' ')) || (c == _T('\t')) || (c == _T('\r')) || (c == _T('\n')) || (c == _T('\0')) );
@ -460,7 +461,6 @@ static inline bool IsEnd( TCHAR c )
return ( (c == _T('\0')) );
}
/*
///////////////////////////////////////////////////////////////////////////////
// util_PrintFCO
///////////////////////////////////////////////////////////////////////////////

View File

@ -514,13 +514,6 @@ cFCOReportChangeIter::cFCOReportChangeIter(const cFCOReportSpecIter& specIter)
SetSpecIter(specIter);
}
cFCOReportChangeIter::cFCOReportChangeIter()
{
mpData = new cFCOReportChangeIter_i;
mpData->mpList = 0;
mpData->mIter = mpData->mpList->begin();
}
cFCOReportChangeIter::cFCOReportChangeIter(const cFCOReportChangeIter& rhs)
{
mpData = new cFCOReportChangeIter_i;

View File

@ -227,7 +227,6 @@ class cFCOReportChangeIter
{
public:
cFCOReportChangeIter(const cFCOReportSpecIter& specIter);
cFCOReportChangeIter();
cFCOReportChangeIter(const cFCOReportChangeIter& rhs);
~cFCOReportChangeIter();
@ -251,6 +250,8 @@ public:
const cFCOPropVector& GetChangeVector() const;
private:
cFCOReportChangeIter() {}
cFCOReportChangeIter_i* mpData;
// TODO -- if it turns out that we are creating a lot of these, we should consider
// making a pool of them.

View File

@ -1519,6 +1519,9 @@ void cTextReportViewer::DisplayChangedProps( const iFCO* const pfcoOld, const iF
void cTextReportViewer::OutputAddedSummary( const cFCOReportSpecIter& ri, FCOList* pFCONameList )
{
if (!pFCONameList)
return;
if( ! ri.GetAddedSet()->IsEmpty() )
{
(*mpOut) << TSS_GetString( cTW, tw::STR_ADDED ) << _T(":") << endl;
@ -1538,7 +1541,10 @@ void cTextReportViewer::OutputAddedSummary( const cFCOReportSpecIter& ri, FCOLis
}
void cTextReportViewer::OutputRemovedSummary( const cFCOReportSpecIter& ri, FCOList* pFCONameList)
{
{
if (!pFCONameList)
return;
if( ! ri.GetRemovedSet()->IsEmpty() )
{
(*mpOut) << TSS_GetString( cTW, tw::STR_REMOVED ) << _T(":") << endl;
@ -1558,7 +1564,10 @@ void cTextReportViewer::OutputRemovedSummary( const cFCOReportSpecIter& ri, FCOL
}
void cTextReportViewer::OutputChangedSummary( const cFCOReportSpecIter& ri, FCOList* pFCONameList )
{
{
if (!pFCONameList)
return;
if( ri.GetNumChanged() > 0 )
{
(*mpOut) << TSS_GetString( cTW, tw::STR_CHANGED ) << _T(":") << endl;

View File

@ -295,6 +295,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@

View File

@ -1556,16 +1556,12 @@ int cTWAModeExamine::Execute(cErrorQueue* pQueue)
// Output the keys that decrypt the file.
iUserNotify::GetInstance()->Notify(iUserNotify::V_NORMAL, TSS_GetString(cTWAdmin, twadmin::STR_KEYS_DECRYPT ).c_str());
iUserNotify::GetInstance()->Notify(iUserNotify::V_NORMAL, TSS_GetString(cTW, tw::STR_NEWLINE ).c_str());
bool siteDecrypts = false, localDecrypts = false;
if (siteKey.KeysLoaded())
try
{
if (manip.TestDecryption(*siteKey.GetPublicKey(), false) != false)
{
siteDecrypts = true;
iUserNotify::GetInstance()->Notify(iUserNotify::V_SILENT, TSS_GetString(cTWAdmin, twadmin::STR_SITEKEYFILE ).c_str());
iUserNotify::GetInstance()->Notify(iUserNotify::V_SILENT, cDisplayEncoder::EncodeInline( mSiteKeyFile ).c_str());
@ -1579,7 +1575,6 @@ int cTWAModeExamine::Execute(cErrorQueue* pQueue)
{
if (manip.TestDecryption(*localKey.GetPublicKey(), false) != false)
{
localDecrypts = true;
iUserNotify::GetInstance()->Notify(iUserNotify::V_SILENT, TSS_GetString(cTWAdmin, twadmin::STR_LOCALKEYFILE ).c_str());
iUserNotify::GetInstance()->Notify(iUserNotify::V_SILENT, cDisplayEncoder::EncodeInline( mLocalKeyFile ).c_str());
@ -1834,7 +1829,6 @@ int cTWAModeGenerateKeys::Execute(cErrorQueue* pQueue)
//
if(! bPrintedPassphraseHint)
{
bPrintedPassphraseHint = true;
iUserNotify::GetInstance()->Notify( iUserNotify::V_NORMAL, TSS_GetString(cTWAdmin, twadmin::STR_PASSPHRASE_HINT).c_str() );
}
@ -2162,7 +2156,6 @@ int cTWAModeChangePassphrases::Execute(cErrorQueue* pQueue)
//
if(! bPrintedPassphraseHint)
{
bPrintedPassphraseHint = true;
iUserNotify::GetInstance()->Notify( iUserNotify::V_NORMAL, TSS_GetString(cTWAdmin, twadmin::STR_PASSPHRASE_HINT).c_str() );
}

View File

@ -301,6 +301,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@

View File

@ -302,6 +302,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@

View File

@ -295,6 +295,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@

View File

@ -335,6 +335,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@

View File

@ -300,6 +300,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@