Prereq: 1.07 diff -cr --new-file /tmp/tct-1.07/patchlevel ./patchlevel *** /tmp/tct-1.07/patchlevel Mon May 14 13:12:49 2001 --- ./patchlevel Sat Sep 15 16:49:24 2001 *************** *** 1 **** ! 1.07 --- 1 ---- ! 1.08 diff -cr --new-file /tmp/tct-1.07/CHANGES ./CHANGES *** /tmp/tct-1.07/CHANGES Mon May 14 13:17:30 2001 --- ./CHANGES Sat Sep 15 16:42:32 2001 *************** *** 1,3 **** --- 1,23 ---- + Sun Sep 9 17:23:13 EDT 2001 + + o Discovered to my horror that unrm on ext2fs can have an + off-by-one error when testing a bit flag in the data block + allocation bitmaps - and this problem is dependent on the + Linux version being used. + + o Made the timeout command a little more verbose so it is + less of a mystery when the child process is killed. + + Thu Sep 6 13:51:00 EDT 2001 + + o New grave-robber -I option for better control of icat/pcat. + + Mon May 21 10:11:19 EDT 2001 + + o findkey command-line error check was too conservative, + and disallowed threshold of 256 different byte values + (Ovanes Manucharyan). + Mon May 14 13:11:54 EDT 2001 o Patch 06 broke lib/pass.cache.pl, which broke mactime. diff -cr --new-file /tmp/tct-1.07/bin/grave-robber ./bin/grave-robber *** /tmp/tct-1.07/bin/grave-robber Mon May 14 13:13:21 2001 --- ./bin/grave-robber Sat Sep 15 16:49:17 2001 *************** *** 1,7 **** #!/usr/bin/perl5 # ! # Usage: $0 [-filmnpstvDEFMOPVS] [-b body_file] [-c corpse_dir] # [-d data_directory] [-e error_file] [-o os_type] # [directory_name(s)] # --- 1,7 ---- #!/usr/bin/perl5 # ! # Usage: $0 [-filmnpstvDEFIMOPVS] [-b body_file] [-c corpse_dir] # [-d data_directory] [-e error_file] [-o os_type] # [directory_name(s)] # *************** *** 41,46 **** --- 41,51 ---- # # -i collect dead inode data # + # -I capture running process based on their inodes/proc + # stuff. Try copying from proc first, and then + # tries icat (does both in case can read inodes but + # not /proc). Requires a live system. + # # -l do the "look@first" stuff - process the path, # look at files in the look@first dir. Requires a # live system. *************** *** 58,65 **** # some systems have trouble with this, so beware! # Requires a live system. # ! # -P run the process commands - ps, lsof, icat'ing pid's. ! # Requires a live system. # # -s run the general Shell commands on the host; this # includes network & host info gathering, such as --- 63,70 ---- # some systems have trouble with this, so beware! # Requires a live system. # ! # -P run the process commands - ps, lsof, etc. Requires ! # a live system. # # -s run the general Shell commands on the host; this # includes network & host info gathering, such as *************** *** 82,88 **** # make sense with the -m option. Implies -P, -s, # and -O # ! # -n Default data collection. Sets -i, -m, -M, -P, # -s, -t, -l, -O, -F, -S, -V. # # -E Everything collected that it can, including dangerous --- 87,93 ---- # make sense with the -m option. Implies -P, -s, # and -O # ! # -n Default data collection. Sets -i, -I, -m, -M, -P, # -s, -t, -l, -O, -F, -S, -V. # # -E Everything collected that it can, including dangerous *************** *** 121,146 **** require "getopts.pl"; require "savecore.pl"; ! $usage = "Usage: $0 [-filmnpstvDEFMOPSV] [-b bodyfile] [-c corpse_dir] [-d data_directory]\n\t[-e error_file] [-o OS] [directory_name(s)]\n"; ! &Getopts("b:c:d:e:o:filmnpstvDEFMOPVS") || die $usage; # # macro options... imply lots of others # if ($opt_E) { ! $opt_i=$opt_m=$opt_M=$opt_P=$opt_s=$opt_t=$opt_l=$opt_O=$opt_F=$opt_S=$opt_V=$opt_p=1; } if ($opt_f) {$opt_P = $opt_s = $opt_O = 1;} # # default - no micro/macro options at all, or -n flag # ! if ($opt_c&&!$opt_l&&!$opt_M&&!$opt_E&&!$opt_f&&!$opt_i&&!$opt_m&&!$opt_p&&!$opt_P&&!$opt_s&&!$opt_t&&!$opt_m&&!$opt_O&&!$opt_F&&!$opt_S&&!$opt_V) { ! $opt_i=$opt_m=$opt_M=$opt_s=$opt_t=$opt_F=$opt_S=$opt_V=1; } ! if ($opt_n||(!$opt_l&&!$opt_M&&!$opt_E&&!$opt_f&&!$opt_i&&!$opt_m&&!$opt_p&&!$opt_P&&!$opt_s&&!$opt_t&&!$opt_m&&!$opt_O&&!$opt_F&&!$opt_S&&!$opt_V)) { ! $opt_i=$opt_m=$opt_M=$opt_P=$opt_s=$opt_t=$opt_l=$opt_O=$opt_F=$opt_S=$opt_V=1; } # --- 126,151 ---- require "getopts.pl"; require "savecore.pl"; ! $usage = "Usage: $0 [-filmnpstvDEFIMOPSV] [-b bodyfile] [-c corpse_dir] [-d data_directory]\n\t[-e error_file] [-o OS] [directory_name(s)]\n"; ! &Getopts("b:c:d:e:o:filmnpstvDEFIMOPVS") || die $usage; # # macro options... imply lots of others # if ($opt_E) { ! $opt_i=$opt_I=$opt_m=$opt_M=$opt_P=$opt_s=$opt_t=$opt_l=$opt_O=$opt_F=$opt_S=$opt_V=$opt_p=1; } if ($opt_f) {$opt_P = $opt_s = $opt_O = 1;} # # default - no micro/macro options at all, or -n flag # ! if ($opt_c&&!$opt_l&&!$opt_M&&!$opt_E&&!$opt_f&&!$opt_i&&!$opt_I&&!$opt_m&&!$opt_p&&!$opt_P&&!$opt_s&&!$opt_t&&!$opt_m&&!$opt_O&&!$opt_F&&!$opt_S&&!$opt_V) { ! $opt_i=$opt_I=$opt_m=$opt_M=$opt_s=$opt_t=$opt_F=$opt_S=$opt_V=1; } ! if ($opt_n||(!$opt_l&&!$opt_M&&!$opt_E&&!$opt_f&&!$opt_i&&!$opt_I&&!$opt_m&&!$opt_p&&!$opt_P&&!$opt_s&&!$opt_t&&!$opt_m&&!$opt_O&&!$opt_F&&!$opt_S&&!$opt_V)) { ! $opt_i=$opt_I=$opt_m=$opt_M=$opt_P=$opt_s=$opt_t=$opt_l=$opt_O=$opt_F=$opt_S=$opt_V=1; } # *************** *** 216,232 **** # are controlled by micro options and if we're looking at a corpse # or not: # ! # process stuff - all but pcat stuff if ($opt_P) { $do_ps = 1; - $do_proc = 1; $do_dev = 1; ! $do_icat = 1; } if ($opt_l) { $do_first_looks = 1; } # -p requires that ps be used as well if ($opt_p) { $do_ps = $do_pcat = 1; } if ($opt_i) { $do_free_inodes = 1; } if ($opt_t) { $do_trust = 1; } if ($opt_O) { $do_save_open = 1; } if ($opt_F) { $do_file_collect = $do_file_walk = 1; } --- 221,238 ---- # are controlled by micro options and if we're looking at a corpse # or not: # ! # process stuff - no inode & pcat stuff if ($opt_P) { $do_ps = 1; $do_dev = 1; ! # $do_proc = 1; ! # $do_icat = 1; } if ($opt_l) { $do_first_looks = 1; } # -p requires that ps be used as well if ($opt_p) { $do_ps = $do_pcat = 1; } if ($opt_i) { $do_free_inodes = 1; } + if ($opt_I) { $do_dev = $do_proc = $do_icat = 1; } if ($opt_t) { $do_trust = 1; } if ($opt_O) { $do_save_open = 1; } if ($opt_F) { $do_file_collect = $do_file_walk = 1; } *************** *** 291,297 **** # # suck in all process info # ! &suck_lsof() if $do_ps; &suck_ps() if $do_ps; # --- 297,303 ---- # # suck in all process info # ! &suck_lsof() if $do_ps || $do_icat; &suck_ps() if $do_ps; # *************** *** 320,332 **** # # This wants something that has process id's to be run before it. ! # Saves the executable of currently running programs from /proc ! # ! if (!$proc_fs || !$do_proc || !&cp_all_from_proc()) { ! # ! # This requires suck_lsof() be run. Saves the executable of currently ! # running programs. # &suck_proc_icat() if $do_icat; } --- 326,335 ---- # # This wants something that has process id's to be run before it. ! # Saves the executable of currently running programs using /proc & icat # + if ($do_proc || $do_icat) { + &cp_all_from_proc() if ($proc_fs || $do_proc); &suck_proc_icat() if $do_icat; } diff -cr --new-file /tmp/tct-1.07/extras/findkey/findkey.c ./extras/findkey/findkey.c *** /tmp/tct-1.07/extras/findkey/findkey.c Sun Jul 30 19:39:20 2000 --- ./extras/findkey/findkey.c Mon May 21 10:10:15 2001 *************** *** 274,280 **** case 't': if ((threshold = atoi(optarg)) <= 0) error("bad threshold value: %s", optarg); ! if (threshold >= ALL_BYTES) error("threshold cannot be larger than %d", ALL_BYTES); break; case 'w': --- 274,280 ---- case 't': if ((threshold = atoi(optarg)) <= 0) error("bad threshold value: %s", optarg); ! if (threshold > ALL_BYTES) error("threshold cannot be larger than %d", ALL_BYTES); break; case 'w': diff -cr --new-file /tmp/tct-1.07/lib/command.pl ./lib/command.pl *** /tmp/tct-1.07/lib/command.pl Sat Aug 26 17:22:08 2000 --- ./lib/command.pl Fri Sep 7 10:57:26 2001 *************** *** 92,98 **** die "pipe_command: invalid pipe mode: $mode\n" unless ($mode eq "-|" || $mode eq "|-"); ! &log_item($mode eq "-|" ? "PIPETO_CMD" : "PIPEFROM_CMD", @command); return(undef) unless defined($pid = open($handle, $mode)); --- 92,98 ---- die "pipe_command: invalid pipe mode: $mode\n" unless ($mode eq "-|" || $mode eq "|-"); ! &log_item($mode eq "|-" ? "PIPETO_CMD" : "PIPEFROM_CMD", @command); return(undef) unless defined($pid = open($handle, $mode)); diff -cr --new-file /tmp/tct-1.07/man/man1/grave-robber.1 ./man/man1/grave-robber.1 *** /tmp/tct-1.07/man/man1/grave-robber.1 Mon Jul 31 10:17:54 2000 --- ./man/man1/grave-robber.1 Sat Sep 15 16:41:06 2001 *************** *** 4,10 **** .SH SYNOPSIS .B grave-robber [ ! .B \-filmnpstvDEFMOPVS ] [ .B \-b body_file --- 4,10 ---- .SH SYNOPSIS .B grave-robber [ ! .B \-filmnpstvDEFIMOPVS ] [ .B \-b body_file *************** *** 108,114 **** This collects everything that it can, including dangerous operations like .I pcat. ! Currently that only adds -p to the default. .TP 8 .B \-f Fast/quick capture - try to avoid the file system; no MD5's, lstat(), or --- 108,114 ---- This collects everything that it can, including dangerous operations like .I pcat. ! Currently this only adds -I and -p to the default. .TP 8 .B \-f Fast/quick capture - try to avoid the file system; no MD5's, lstat(), or *************** *** 125,130 **** --- 125,131 ---- .B \-s, .B \-t, .B \-l, + .B \-I, .B \-O, .B \-F, .B \-S, *************** *** 146,151 **** --- 147,158 ---- .B \-i collect inode data from the unallocated area of the file systems. Requires read access to the device in question. + .TP 8 + .B \-I + capture the executable files of running process. First try copying + the executable file using information found in /proc, then try to use + icat with inode information that was obtained from lsof. Requires + a live system. .TP 8 .B \-l Before gathering the requested information, lstat() all files and diff -cr --new-file /tmp/tct-1.07/man/man1/icat.1 ./man/man1/icat.1 *** /tmp/tct-1.07/man/man1/icat.1 Sun Jul 30 19:39:20 2000 --- ./man/man1/icat.1 Fri Sep 7 18:17:21 2001 *************** *** 10,16 **** .nf .ad .fi ! \fBicat\fR [\fB-hHv\fR] [\fB-f \fIfstype\fR] \fIdevice\fR \fIinode\fR ... .SH DESCRIPTION .ad --- 10,16 ---- .nf .ad .fi ! \fBicat\fR [\fB-hHvV\fR] [\fB-f \fIfstype\fR] \fIdevice\fR \fIinode\fR ... .SH DESCRIPTION .ad *************** *** 32,38 **** information is preserved. This option wastes space when copying sparse files. .IP \fB-v\fR ! Enable verbose mode, for debugging purposes. .IP \fIdevice\fR Disk special file, or regular file containing a disk image. On UNIX systems, raw mode disk access may give better performance --- 32,40 ---- information is preserved. This option wastes space when copying sparse files. .IP \fB-v\fR ! Enable verbose mode, output to stderr. ! .IP \fB-V\fR ! Enable verbose mode, output to stdout. .IP \fIdevice\fR Disk special file, or regular file containing a disk image. On UNIX systems, raw mode disk access may give better performance diff -cr --new-file /tmp/tct-1.07/man/man1/ils.1 ./man/man1/ils.1 *** /tmp/tct-1.07/man/man1/ils.1 Fri Aug 4 13:46:55 2000 --- ./man/man1/ils.1 Fri Sep 7 18:17:21 2001 *************** *** 10,19 **** .nf .ad .fi ! \fBils\fR [\fB-eorv\fR] [\fB-f \fIfstype\fR] \fIdevice\fR [\fIstart-stop\fR ...] ! \fBils\fR [\fB-aAlLvzZ\fR] [\fB-f \fIfstype\fR] \fIdevice\fR [\fIstart-stop\fR ...] .SH DESCRIPTION .ad --- 10,19 ---- .nf .ad .fi ! \fBils\fR [\fB-eorvV\fR] [\fB-f \fIfstype\fR] \fIdevice\fR [\fIstart-stop\fR ...] ! \fBils\fR [\fB-aAlLvVzZ\fR] [\fB-f \fIfstype\fR] \fIdevice\fR [\fIstart-stop\fR ...] .SH DESCRIPTION .ad *************** *** 38,44 **** for \fB-LZ\fR (see the \fBfine controls\fR section below). .IP \fB-v\fR ! Turn on verbose mode. .IP \fIdevice\fR Disk special file, or regular file containing a disk image. On UNIX systems, raw mode disk access may give better performance --- 38,46 ---- for \fB-LZ\fR (see the \fBfine controls\fR section below). .IP \fB-v\fR ! Turn on verbose mode, output to stderr. ! .IP \fB-V\fR ! Turn on verbose mode, output to stdout. .IP \fIdevice\fR Disk special file, or regular file containing a disk image. On UNIX systems, raw mode disk access may give better performance diff -cr --new-file /tmp/tct-1.07/man/man1/unrm.1 ./man/man1/unrm.1 *** /tmp/tct-1.07/man/man1/unrm.1 Sun Jul 30 19:39:20 2000 --- ./man/man1/unrm.1 Fri Sep 7 18:17:21 2001 *************** *** 10,16 **** .nf .ad .fi ! \fBunrm\fR [\fB-bev\fR] [\fB-f \fIfstype\fR] \fIdevice\fR [\fIstart-stop\fR ...] .SH DESCRIPTION .ad --- 10,16 ---- .nf .ad .fi ! \fBunrm\fR [\fB-bevV\fR] [\fB-f \fIfstype\fR] \fIdevice\fR [\fIstart-stop\fR ...] .SH DESCRIPTION .ad *************** *** 33,39 **** is \fBufs\fR (Berkeley fast file system). With Linux the default type is \fBext2fs\fR (second extended file system). .IP \fB-v\fR ! Turn on verbose mode. .IP \fIdevice\fR Disk special file, or regular file containing a disk image. On UNIX systems, raw mode disk access may give better performance --- 33,41 ---- is \fBufs\fR (Berkeley fast file system). With Linux the default type is \fBext2fs\fR (second extended file system). .IP \fB-v\fR ! Turn on verbose mode, output to stderr. ! .IP \fB-V\fR ! Turn on verbose mode, output to stdout. .IP \fIdevice\fR Disk special file, or regular file containing a disk image. On UNIX systems, raw mode disk access may give better performance diff -cr --new-file /tmp/tct-1.07/reconfig ./reconfig *** /tmp/tct-1.07/reconfig Sun Jul 30 19:39:20 2000 --- ./reconfig Sat Sep 15 16:48:51 2001 *************** *** 84,90 **** system "$PERL -pi -e \"s@^#!.*/perl.*@#!$PERL@;\" $perl5_src"; # make sure things are executable... ! system("chmod u+x $perl5_src"); print "\nSo far so good...\nLooking for all the commands now...\n"; --- 84,90 ---- system "$PERL -pi -e \"s@^#!.*/perl.*@#!$PERL@;\" $perl5_src"; # make sure things are executable... ! system("chmod +x $perl5_src"); print "\nSo far so good...\nLooking for all the commands now...\n"; diff -cr --new-file /tmp/tct-1.07/src/fstools/ext2fs.c ./src/fstools/ext2fs.c *** /tmp/tct-1.07/src/fstools/ext2fs.c Thu Feb 22 11:16:00 2001 --- ./src/fstools/ext2fs.c Sun Sep 9 17:21:19 2001 *************** *** 310,316 **** GRPNUM_T grpnum; UCHAR *bmap = 0; DADDR_T addr; ! DADDR_T dbase; int myflags; /* --- 310,317 ---- GRPNUM_T grpnum; UCHAR *bmap = 0; DADDR_T addr; ! DADDR_T dbase; /* first block number in group */ ! DADDR_T dmin; /* first block after inodes */ int myflags; /* *************** *** 332,349 **** * Be sure to use the right group descriptor information. XXX There * appears to be an off-by-one discrepancy between bitmap offsets and * disk block numbers. */ ! grpnum = (addr - 1) / ext2fs->fs.s_blocks_per_group; if (bmap == 0 || ext2fs->bmap_num != grpnum) { bmap = ext2fs_bmap_lookup(ext2fs, grpnum); ! dbase = grpnum * ext2fs->fs.s_blocks_per_group + 1; } /* ! * Pass blocks of interest to the application. */ myflags = (isset(bmap, addr - dbase) ? FS_FLAG_ALLOC : FS_FLAG_UNALLOC); if (flags & myflags) { fs_read_block(fs, fs_buf, fs->block_size, addr, "data block"); action(addr, fs_buf->data, myflags, ptr); --- 333,392 ---- * Be sure to use the right group descriptor information. XXX There * appears to be an off-by-one discrepancy between bitmap offsets and * disk block numbers. + * + * Addendum: this offset is controlled by the super block's + * s_first_data_block field. */ ! #define INODE_TABLE_SIZE(ext2fs) \ ! ((ext2fs->fs.s_inodes_per_group * sizeof(struct ext2_inode) - 1) \ ! / ext2fs->fs_info.block_size + 1) ! ! grpnum = (addr - ext2fs->fs.s_first_data_block) ! / ext2fs->fs.s_blocks_per_group; if (bmap == 0 || ext2fs->bmap_num != grpnum) { bmap = ext2fs_bmap_lookup(ext2fs, grpnum); ! dbase = grpnum * ext2fs->fs.s_blocks_per_group ! + ext2fs->fs.s_first_data_block; ! dmin = ext2fs->group.bg_inode_table + INODE_TABLE_SIZE(ext2fs); ! if (verbose) ! fprintf(logfp, "group %d dbase %lu bmap %+ld imap %+ld inos %+ld..%ld\n", ! (int) grpnum, ! (ULONG) dbase, ! (long) ext2fs->group.bg_block_bitmap - (long) dbase, ! (long) ext2fs->group.bg_inode_bitmap - (long) dbase, ! (long) ext2fs->group.bg_inode_table - (long) dbase, ! (long) dmin - 1 - dbase); } /* ! * Pass blocks of interest to the application. Identify meta blocks ! * (any blocks that can't be allocated for file/directory data). ! * ! * XXX With sparse superblock placement, most block groups have the ! * block and inode bitmaps where one would otherwise find the backup ! * superblock and the backup group descriptor blocks. The inode ! * blocks are in the normal place, though. This leaves little gaps ! * between the bitmaps and the inode table - and ext2fs will use ! * those blocks for file/directory data blocks. So we must properly ! * account for those gaps between meta blocks. ! * ! * Thus, superblocks and group descriptor blocks are sometimes overlaid ! * by bitmap blocks. This means that one can still assume that the ! * locations of superblocks and group descriptor blocks are reserved. ! * They just happen to be reserved for something else :-) */ myflags = (isset(bmap, addr - dbase) ? FS_FLAG_ALLOC : FS_FLAG_UNALLOC); + if ((addr >= dbase && addr < ext2fs->group.bg_block_bitmap) + || (addr == ext2fs->group.bg_block_bitmap) + || (addr == ext2fs->group.bg_inode_bitmap) + || (addr >= ext2fs->group.bg_inode_table && addr < dmin)) + myflags |= FS_FLAG_META; + if ((myflags & FS_FLAG_META) && (myflags & FS_FLAG_UNALLOC)) { + remark("unallocated meta block %lu!! dbase %lu dmin %lu", + (unsigned long) addr, (unsigned long) dbase, + (unsigned long) dmin); + } if (flags & myflags) { fs_read_block(fs, fs_buf, fs->block_size, addr, "data block"); action(addr, fs_buf->data, myflags, ptr); *************** *** 390,395 **** --- 433,445 ---- error("%s: read superblock: %m", name); if (ext2fs->fs.s_magic != EXT2_SUPER_MAGIC) error("%s: bad magic number in superblock", name); + if (verbose) { + #ifdef EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER + if (ext2fs->fs.s_feature_ro_compat & EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER) + fprintf(logfp, "File system has sparse super blocks\n"); + #endif + fprintf(logfp, "First data block is %d\n", (int) ext2fs->fs.s_first_data_block); + } /* * Translate some filesystem-specific information to generic form. diff -cr --new-file /tmp/tct-1.07/src/fstools/ffs.c ./src/fstools/ffs.c *** /tmp/tct-1.07/src/fstools/ffs.c Sat Aug 12 10:50:15 2000 --- ./src/fstools/ffs.c Sat Sep 15 16:45:56 2001 *************** *** 245,250 **** --- 245,252 ---- CGNUM_T cg_num; struct cg *cg = 0; DADDR_T dbase; + DADDR_T dmin; /* first data block in group */ + DADDR_T sblock; /* super block in group */ DADDR_T addr; DADDR_T faddr; unsigned char *freeblocks; *************** *** 290,296 **** --- 292,304 ---- cg = ffs_cgroup_lookup(ffs, cg_num); freeblocks = (unsigned char *) cg_blksfree(cg); dbase = cgbase(ffs->fs, cg_num); + dmin = cgdmin(ffs->fs, cg_num); + sblock = cgsblock(ffs->fs, cg_num); } + if (addr < dbase) + remark("impossible: cyl group %lu: block %lu < cgbase %lu", + (unsigned long) cg_num, (unsigned long) addr, + (unsigned long) dbase); /* * Prepare for file systems that have a partial last logical block. *************** *** 312,321 **** --- 320,337 ---- * Pass blocks of interest to the application, optionally padding the * data with null blocks in order to maintain logical block * alignment. + * + * Beware: FFS stores file data in the blocks between the start of a + * cylinder group and the start of its super block. */ for (faddr = addr; faddr < addr + frags; faddr++) { myflags = (isset(freeblocks, faddr - dbase) ? FS_FLAG_UNALLOC : FS_FLAG_ALLOC); + if (faddr >= sblock && faddr < dmin) + myflags |= FS_FLAG_META; + if ((myflags & FS_FLAG_META) && (myflags & FS_FLAG_UNALLOC)) + remark("impossible: unallocated meta block %lu!!", + (unsigned long) faddr); if ((flags & myflags) != myflags) { if (flags & FS_FLAG_ALIGN) action(faddr, null_block, myflags, ptr); diff -cr --new-file /tmp/tct-1.07/src/fstools/fs_tools.h ./src/fstools/fs_tools.h *** /tmp/tct-1.07/src/fstools/fs_tools.h Thu Feb 22 11:16:01 2001 --- ./src/fstools/fs_tools.h Fri Sep 7 13:06:57 2001 *************** *** 247,254 **** #define FS_FLAG_UNALLOC (1<<3) /* unallocated */ #define FS_FLAG_USED (1<<4) /* used */ #define FS_FLAG_UNUSED (1<<5) /* never used */ ! #define FS_FLAG_ALIGN (1<<6) /* block align */ ! #define FS_FLAG_TMHDR (1<<7) /* show tm header */ /* * I/O buffer, used for all forms of I/O. --- 247,255 ---- #define FS_FLAG_UNALLOC (1<<3) /* unallocated */ #define FS_FLAG_USED (1<<4) /* used */ #define FS_FLAG_UNUSED (1<<5) /* never used */ ! #define FS_FLAG_META (1<<6) /* meta data block */ ! #define FS_FLAG_ALIGN (1<<7) /* block align */ ! #define FS_FLAG_TMHDR (1<<8) /* show tm header */ /* * I/O buffer, used for all forms of I/O. diff -cr --new-file /tmp/tct-1.07/src/misc/timeout.c ./src/misc/timeout.c *** /tmp/tct-1.07/src/misc/timeout.c Tue Aug 22 09:52:47 2000 --- ./src/misc/timeout.c Sun Sep 9 17:46:10 2001 *************** *** 43,48 **** --- 43,49 ---- static int kill_signal = SIGKILL; static char *progname; + static char *commandname; static void usage() { *************** *** 53,58 **** --- 54,62 ---- static void terminate(sig) int sig; { + signal(kill_signal, SIG_DFL); + fprintf(stderr, "Timeout: aborting command ``%s'' with signal %d\n", + commandname, kill_signal); kill(0, kill_signal); } *************** *** 76,81 **** --- 80,87 ---- if (argc < 2 || (time_to_run = atoi(argv[0])) <= 0) usage(); + + commandname = argv[1]; /* * Run the command and its watchdog in a separate process group so that