[Aide] aide problems under HP-UX 10.20

Fisher, Charles J. Charles.Fisher at alcoa.com
Tue Oct 26 17:53:31 EEST 2004


I don't know if this includes vsnprintf, but I have the final set of patches for 10.20 that were issued in 12/2001. These are General Release and Hardware Critical patches:

:/u03/build/aide-0.10:root> swlist | egrep 'GR|HWCR'
  XSW800GR1020                  B.10.20.55.3   General Release Patches for HP-UX 10.20 Servers (December 2001)
  XSW800HWCR1020                B.10.20.55.2   Hardware Enablement and Critical Patches for HP-UX 10.20 Servers (December 2001)


When I run configure, I see:

checking for vsnprintf... yes


In config.log, no news is good news, right?

configure:2483: checking for vsnprintf
configure:2511: gcc -o conftest -g -I/usr/local/include -static  -/u03/build/aide-0.10 -I/u03/build/aide-0.10/src -static -L/usr/local/lib -g conftest.c  1>&5


Here is the output of my run of configure:

:/u03/build/hold:root> export PATH=/opt/binutils/bin:/opt/gcc/bin:/opt/bison/bin:/opt/flex/bin:$PATH
:/u03/build/hold:root> export CC=gcc
:/u03/build/hold:root> export CFLAGS="-g -I/usr/local/include"
:/u03/build/hold:root> export LDFLAGS="-L/usr/local/lib"
:/u03/build/hold:root> export ECHO="print -r"
:/u03/build/hold:root> cd aide-0.10/
:/u03/build/hold/aide-0.10:root> ./configure --with-zlib=/usr/local
creating cache ./config.cache
checking for a BSD compatible install... /opt/imake/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal-1.4... missing
checking for working autoconf... missing
checking for working automake-1.4... missing
checking for working autoheader... missing
checking for working makeinfo... missing
checking for gcc... gcc
checking whether the C compiler (gcc -g -I/usr/local/include -L/usr/local/lib) works... yes
checking whether the C compiler (gcc -g -I/usr/local/include -L/usr/local/lib) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking whether make sets ${MAKE}... (cached) yes
checking for ranlib... ranlib
checking for bison... bison -y
checking how to run the C preprocessor... gcc -E
checking for flex... flex
checking for flex... (cached) flex
checking for yywrap in -lfl... no
checking lex output file root... lex.yy
checking whether yytext is a pointer... no
checking for gcc option to accept ANSI C... none needed
checking whether build environment is sane... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for library containing syslog... none required
checking endianess... big
checking for byte typedef... no
checking for ushort typedef... yes
checking for ulong typedef... no
checking for u16 typedef... no
checking for u32 typedef... no
checking size of unsigned short... 2
checking size of unsigned int... 4
checking size of unsigned long... 4
checking for ANSI C header files... yes
checking for readdir... yes
checking for readdir_r... yes
checking for stricmp... no
checking for ustat... yes
checking for mmap... yes
checking for vsnprintf... yes
checking for syslog.h... yes
checking for ustat.h... yes
checking for acl-support... no
checking for regexec... yes
checking for regcomp... yes
checking for mhash_get_block_size in -lmhash... yes
checking for crypt in -lc... yes
checking for PostgresSQL support... no
updating cache ./config.cache
creating ./config.status
creating Makefile
creating src/Makefile
creating po/Makefile
creating doc/Makefile
creating doc/aide.conf
creating aide.spec
creating config.h


Here is the relevant section from config.log:

configure:2310: checking for ustat
configure:2338: gcc -o conftest -g -I/usr/local/include -static  -I/u03/build/aide-0.10 -I/u03/build/aide-0.10/src -static -L/usr/local/lib -g conftest.c  1>&5
configure:2427: checking for mmap
configure:2455: gcc -o conftest -g -I/usr/local/include -static  -I/u03/build/aide-0.10 -I/u03/build/aide-0.10/src -static -L/usr/local/lib -g conftest.c  1>&5
configure:2483: checking for vsnprintf
configure:2511: gcc -o conftest -g -I/usr/local/include -static  -I/u03/build/aide-0.10 -I/u03/build/aide-0.10/src -static -L/usr/local/lib -g conftest.c  1>&5
configure:2537: checking for syslog.h
configure:2547: gcc -E  -I/u03/build/aide-0.10 -I/u03/build/aide-0.10/src -static conftest.c >/dev/null 2>conftest.out
configure:2537: checking for ustat.h
configure:2547: gcc -E  -I/u03/build/aide-0.10 -I/u03/build/aide-0.10/src -static conftest.c >/dev/null 2>conftest.out
configure:2690: checking for acl-support
configure:3096: checking for regexec
configure:3124: gcc -o conftest -g -I/usr/local/include -static  -I/u03/build/aide-0.10 -I/u03/build/aide-0.10/src -static -L/usr/local/lib -g conftest.c  1>&5
configure:3096: checking for regcomp
configure:3124: gcc -o conftest -g -I/usr/local/include -static  -I/u03/build/aide-0.10 -I/u03/build/aide-0.10/src -static -L/usr/local/lib -g conftest.c  1>&5
configure:3208: checking for mhash_get_block_size in -lmhash
configure:3227: gcc -o conftest -g -I/usr/local/include -static  -I/u03/build/aide-0.10 -I/u03/build/aide-0.10/src -static -L/usr/local/lib -g conftest.c -lmhash   1>&5
configure:3478: checking for crypt in -lc
configure:3497: gcc -o conftest -g -I/usr/local/include -static  -I/u03/build/aide-0.10 -I/u03/build/aide-0.10/src -static -L/usr/local/lib -g conftest.c -lc   1>&5
configure:3566: checking for PostgresSQL support


-----Original Message-----
From: Richard van den Berg [mailto:richard at vdberg.org] 
Sent: Tuesday, October 26, 2004 9:27 AM
To: Charles.Fisher at alcoa.com
Cc: Aide user mailinglist
Subject: Re: [Aide] aide problems under HP-UX 10.20

Fisher, Charles J. wrote:
> Program received signal SIGSEGV, Segmentation fault.
> 0x5b674 in cl_57_3a83_tree_delete ()
> (gdb) bt
> #0  0x5b674 in cl_57_3a83_tree_delete ()
> #1  0x59b28 in free ()
> #2  0x26ed0 in dofprintf (s=0x16184 "@@begin_db\n") at db_file.c:146
> #3  0x2856c in db_writespec_file (conf=0x4002cec0) at db_file.c:710
> #4  0x23bbc in db_writespec (conf=0x4002cec0) at db.c:487
> #5  0x34e44 in main (argc=2, argv=0x7b03a738) at aide.c:513
> (gdb)

Thanks, now we are getting somewhere. The call in db_file.c at line 146 
is free(temp). temp is allocated this way:

   va_start(ap,s);
   retval=vsnprintf(buf,3,s,ap);
   va_end(ap);

   temp=(char*)malloc(retval+2);
   if(temp==NULL){

Since temp is not NULL it probably gets overwritten somewhere. From the 
HP site I gather that vsnprintf was added in HP-UX 10.30. Can you 
confirm that you have indeed a working vsnprintf() on your system? 
(Check the aide config.log file.)

Sincerely,

Richard van den Berg


More information about the Aide mailing list