Newsgroups: comp.sources.unix From: spaf@cs.purdue.edu (Gene Spafford) Subject: v27i156: tripwire-1.1 - security integrity monitor, V1.1, Part10/26 References: <1.756157401.21864@gw.home.vix.com> Sender: unix-sources-moderator@gw.home.vix.com Approved: vixie@gw.home.vix.com Submitted-By: spaf@cs.purdue.edu (Gene Spafford) Posting-Number: Volume 27, Issue 156 Archive-Name: tripwire-1.1/part10 #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh 'tripwire-1.1/sigs/snefru/snefruaa' <<'END_OF_FILE' X#ifndef lint Xstatic char rcsid[] = "$Id: snefru.c,v 1.6 1993/12/15 18:28:06 genek Exp $"; X#endif X X/* X * snefru.c X * X * signature function hook for Snefru (the Xerox Secure Hash Function) X * for Tripwire. X * X * Originally released by Xerox into the public domain. Slightly X * changed to facilitate hook into other packages and increase X * portability. X * X * The original distribution banner follows. X * X * Gene Kim X * Purdue University X * September 27, 1992 X */ X Xchar *pltob64(); X X/* X This is an implementation of Snefru. Snefru is a one-way hash X function that provides authentication. It does not provide secrecy. X X Snefru is named after a Pharaoh of ancient Egypt. X X Copyright (c) Xerox Corporation 1989. All rights reserved. X X License to copy and use this software is granted provided that it is X identified as the "Xerox Secure Hash Function" in all material mentioning X or referencing this software or this hash function. X X License is also granted to make and use derivative works provided that such X works are identified as "derived from the Xerox Secure Hash Function" in X all material mentioning or referencing the derived work. X X Xerox Corporation makes no representations concerning either the X merchantability of this software or the suitability of this software for X any particular purpose. It is provided "as is" without express or implied X warranty of any kind. X X These notices must be retained in any copies of any part of this software. X X Updated information about Snefru is available from arisia.xerox.com in X directory /pub/hash by anonymous FTP. The README file provides a quick X introduction. X X This is version 2.5a, November 29, 1990. X Version 2.5a provides a reasonably understandable and efficient X implementation of Snefru. Further, this version provides X 8 passes. While 4 pass Snefru has not been broken, the use X of 4 pass Snefru for production use is not recommended at X this time. Further study of the security of Snefru is X required before production use is advisable. X X This program reads from the standard input until EOF is reached (the first X "read" that returns 0 bytes). The data on the standard input is "hashed" X with a cryptographically secure one-way hash function (also known as a X "message digest", "fingerprint", "Manipulation Detection Code" or "MDC"). X The hash is then printed on the standard output. X X The input can be of any size. The output is 128 bits printed as 32 X characters in hex. The output size can be changed to 256 bits be setting X the parameter OUTPUT_BLOCK_SIZE to 8. (The 8 indicates the number of X 32-bit words in the output). X X The primary use of one-way hash functions is to determine if there have been X any unauthorized, malicious, or accidental changes made to a file. For X example, if an executable program file produces the hash "209884c4 X 2e89d967 5456ac0e 61269550", then any change to that program file will X cause the hash to be changed. Thus, the tampering can be detected by X comparing the current output value with the previously computed (and X presumably correct) output value. X X Hash512 is the centrol routine in this program. It is used in this program in X a linear fashion -- i.e., a sequential file is hashed down by repeated X applications of Hash512. Changing a single bit in the file would then X require completely re-computing the hash from the point of change onward. X X Hash512 can be used in a tree-structured fashion to authenticate a large table X of data. This would imply that changing a single bit would not force a X complete re-computation of the hash value, but would instead require only X log n re-computations of Hash512 to "patch up" the changes along the path X from the root to the changed leaf entry. A tree-structured application X also has the advantage that any single entry in the table can subsequently X be authenticated by someone who knows only the "authentication path" from X the root of the tree to the leaf entry. These concepts are discussed more X thoroughly in "Secrecy, Authentication, and Public Key Systems" by Ralph X C. Merkle, UMI Research Press, 1982 (see particularly Chapter 2, "One Way X Hash Functions"). The use of a tree-structured pattern of applications of X a one-way hash function is covered by U.S. Patent #4,309,569, "Method of X Providing Digital Signatures" (contact Stanford University, Office of X Technology Licensing). X X X At the present time (November 29, 1990) the author knows of no method for X "breaking" this one-way function, (i.e., finding two input files that X produce the same output value). X X We recommend against the use of output sizes smaller than 128 bits, and X against the use of an input that is less than 2 (two) words larger than X the size of the output. When the input size equals the output size, X Snefru suffers a serious degradation in security (an observation due to X Coppersmith). X X Further study and validation of the security of Snefru is required prior X to production use. X X If anyone using this program finds two different inputs that produce the same X output, please contact Ralph C. Merkle via E-mail (merkle@xerox.com) or X via normal mail at: Xerox PARC 3333 Coyote Hill Road Palo Alto, CA 94304 X (415) 494-4000 X X X See the paper "A Fast Software One Way Hash Function" by Ralph C. Merkle, X to appear in The Journal of Cryptology, for a more detailed explanation. X X The following test cases were taken directly from a terminal, and can be used X to verify the correct functioning of an implementation of Snefru. The X first input is simply a carriage return followed by control-d. The second X input is "1" followed by carriage return followed by control-d, the third X input is "12" followed by carriage return followed by control-d, etc. X (In some cases, two control-d's will be required). X XNote that the test cases given are from 8-pass Snefru (e.g., SECURITY_LEVEL=8) X X% ./snefru X X d9fcb317 1c097fbb a8c8f12a a0906bad X% ./snefru X1 X 44ec420c e99c1f62 feb66c53 c24ae453 X% ./snefru X12 X 7182051a a852ef6f ba4b6c9c 9b79b317 X% ./snefru X123 X bc3a50af 82bf56d6 a64732bc 7b050a93 X% ./snefru X1234 X c5b8a049 85a8eadf b4331a89 88752b77 X% ./snefru X12345 X d559a2b6 2f6f4411 1324f852 08723707 X% ./snefru X123456 X 6cfb5e8f 1da02bd1 67b01e48 16686c30 X% ./snefru X1234567 X 29aa4832 5f275a8a 7a01ba15 43c54ba5 X% ./snefru X12345678 X be862a6b 68b7df88 7ebe0031 9cbc4a47 X% ./snefru X123456789 X 6103721c cd8ad565 d68e90b0 f8906163 X% X X XThe following outputs were obtained after the program was Xcompiled with OUTPUT_BLOCK_SIZE set to 8. This can be done Xby using the -D option on cc, as: Xcc -o snefru256 -DOUTPUT_BLOCK_SIZE=8 snefru.c X XNote that the test cases given are from 8-pass Snefru (e.g., SECURITY_LEVEL=8) X X% ./snefru256 X X 2e02687f 0d45d5b9 b50cb68c 3f33e684 3d618a1a ca2d0689 3d3eb4e3 026b5732 X% ./snefru256 X1 X bfea4a05 a2a2ef15 c736d114 598a20b9 d9bd4d66 b661e6b0 5ecf6a77 37bdc58c X% ./snefru256 X12 X ac677d69 761ade3f 189c7aef 106d5fe7 392d324e 19cc76d5 db4a2c05 f2cc2cc5 X% ./snefru256 X123 X 061c76aa 1db4a22c 0e42945e 26c48499 b5400162 e08c640b e05d3c00 7c44793d X% ./snefru256 X1234 X 1e87fe1d 9c927e9e 24be85e3 cc733598 73541640 a6261793 ce5a9749 53113f5e X% ./snefru256 X12345 X 1b59927d 85a9349a 87796620 fe2ff401 a06a7ba4 8794498e bab978ef c3a68912 X% ./snefru256 X123456 X 28e9d9bc 35032b68 faeda881 01ecb252 4317e9da 111b0e3e 70941072 12d9cf72 X% ./snefru256 X1234567 X f7fff4ee 74fd1b8d 6b3267f8 4e47e007 f029d13b 8af7e37e 34d13b46 9b8f248f X% ./snefru256 X12345678 X ee7d64b0 102b2205 e9892661 3b200185 559d08be 6ad787da 717c9687 44e11af3 X% ./snefru256 X123456789 X 4ca72639 e40e9ab9 c0c3f523 c4449b39 11632d37 4c124d77 02192ec2 e4e0b7a3 X% X X Note that "word32" MUST be 32 bits X X Implementor: Ralph C. Merkle X X */ X X#include "../../include/config.h" X#include X#include X#ifdef STDLIBH X#include X#include X#endif X#ifdef STRINGH X#include X#else X#include X#endif X#include "../../include/sigs.h" X#include "../../include/byteorder.h" X X#define INPUT_BLOCK_SIZE 16 /* size in 32-bit words of an input block to X * the hash routine */ X/* X * OUTPUT_BLOCK_SIZE may be set to either 4 or 8. 8 should provide X * a higher level of security (if we presume Snefru can only be broken X * by a brute force attack, than an output size of 8 words or 256 bits X * would require some 2**128 operations to break). The default is 4. X * This parameter can be changed with the -DOUTPUT_BLOCK_SIZE=8 X * command line option to the C compiler. X */ X#ifndef OUTPUT_BLOCK_SIZE X#define OUTPUT_BLOCK_SIZE 4 /* size in 32-bit words of an output block X * from the hash routine */ X#endif X#define CHUNK_SIZE (INPUT_BLOCK_SIZE - OUTPUT_BLOCK_SIZE) X/* generate a mask with log-to-the-base-2(INPUT_BLOCK_SIZE) "1" bits */ X#define MASK (INPUT_BLOCK_SIZE - 1) X X#define round(L,C,N,SB) SBE=SB[C&0xffL];L^=SBE;N^=SBE X#define rotate(B) B=(B>>shift) | (B< command X * line option to the C compiler. X */ X#ifndef SECURITY_LEVEL X#define SECURITY_LEVEL 8 X#endif X#define MAX_SBOX_COUNT 16 X X/* Identify this version for the "what" command */ Xchar ident[] ="@(#) Snefru Version 2.5a November 29, 1990"; X Xtypedef unsigned long int word32; X/* The standard S-Box */ Xword32 standardSBoxes[MAX_SBOX_COUNT][256]= { X X { /* Start of S Box 0 */ X X/* 0*/ 0x64f9001bL,0xfeddcdf6L,0x7c8ff1e2L,0x11d71514L,0x8b8c18d3L, X/* 5*/ 0xdddf881eL,0x6eab5056L,0x88ced8e1L,0x49148959L,0x69c56fd5L, X/* 10*/ 0xb7994f03L,0x0fbcee3eL,0x3c264940L,0x21557e58L,0xe14b3fc2L, X/* 15*/ 0x2e5cf591L,0xdceff8ceL,0x092a1648L,0xbe812936L,0xff7b0c6aL, X/* 20*/ 0xd5251037L,0xafa448f1L,0x7dafc95aL,0x1ea69c3fL,0xa417abe7L, X/* 25*/ 0x5890e423L,0xb0cb70c0L,0xc85025f7L,0x244d97e3L,0x1ff3595fL, X/* 30*/ 0xc4ec6396L,0x59181e17L,0xe635b477L,0x354e7dbfL,0x796f7753L, X/* 35*/ 0x66eb52ccL,0x77c3f995L,0x32e3a927L,0x80ccaed6L,0x4e2be89dL, X/* 40*/ 0x375bbd28L,0xad1a3d05L,0x2b1b42b3L,0x16c44c71L,0x4d54bfa8L, X/* 45*/ 0xe57ddc7aL,0xec6d8144L,0x5a71046bL,0xd8229650L,0x87fc8f24L, X/* 50*/ 0xcbc60e09L,0xb6390366L,0xd9f76092L,0xd393a70bL,0x1d31a08aL, X/* 55*/ 0x9cd971c9L,0x5c1ef445L,0x86fab694L,0xfdb44165L,0x8eaafcbeL, X/* 60*/ 0x4bcac6ebL,0xfb7a94e5L,0x5789d04eL,0xfa13cf35L,0x236b8da9L, X/* 65*/ 0x4133f000L,0x6224261cL,0xf412f23bL,0xe75e56a4L,0x30022116L, X/* 70*/ 0xbaf17f1fL,0xd09872f9L,0xc1a3699cL,0xf1e802aaL,0x0dd145dcL, X/* 75*/ 0x4fdce093L,0x8d8412f0L,0x6cd0f376L,0x3de6b73dL,0x84ba737fL, X/* 80*/ 0xb43a30f2L,0x44569f69L,0x00e4eacaL,0xb58de3b0L,0x959113c8L, X/* 85*/ 0xd62efee9L,0x90861f83L,0xced69874L,0x2f793ceeL,0xe8571c30L, X/* 90*/ 0x483665d1L,0xab07b031L,0x914c844fL,0x15bf3be8L,0x2c3f2a9aL, X/* 95*/ 0x9eb95fd4L,0x92e7472dL,0x2297cc5bL,0xee5f2782L,0x5377b562L, X/* 100*/ 0xdb8ebbcfL,0xf961deddL,0xc59b5c60L,0x1bd3910dL,0x26d206adL, X/* 105*/ 0xb28514d8L,0x5ecf6b52L,0x7fea78bbL,0x504879acL,0xed34a884L, X/* 110*/ 0x36e51d3cL,0x1753741dL,0x8c47caedL,0x9d0a40efL,0x3145e221L, X/* 115*/ 0xda27eb70L,0xdf730ba3L,0x183c8789L,0x739ac0a6L,0x9a58dfc6L, X/* 120*/ 0x54b134c1L,0xac3e242eL,0xcc493902L,0x7b2dda99L,0x8f15bc01L, X/* 125*/ 0x29fd38c7L,0x27d5318fL,0x604aaff5L,0xf29c6818L,0xc38aa2ecL, X/* 130*/ 0x1019d4c3L,0xa8fb936eL,0x20ed7b39L,0x0b686119L,0x89a0906fL, X/* 135*/ 0x1cc7829eL,0x9952ef4bL,0x850e9e8cL,0xcd063a90L,0x67002f8eL, X/* 140*/ 0xcfac8cb7L,0xeaa24b11L,0x988b4e6cL,0x46f066dfL,0xca7eec08L, X/* 145*/ 0xc7bba664L,0x831d17bdL,0x63f575e6L,0x9764350eL,0x47870d42L, X/* 150*/ 0x026ca4a2L,0x8167d587L,0x61b6adabL,0xaa6564d2L,0x70da237bL, X/* 155*/ 0x25e1c74aL,0xa1c901a0L,0x0eb0a5daL,0x7670f741L,0x51c05aeaL, X/* 160*/ 0x933dfa32L,0x0759ff1aL,0x56010ab8L,0x5fdecb78L,0x3f32edf8L, X/* 165*/ 0xaebedbb9L,0x39f8326dL,0xd20858c5L,0x9b638be4L,0xa572c80aL, X/* 170*/ 0x28e0a19fL,0x432099fcL,0x3a37c3cdL,0xbf95c585L,0xb392c12aL, X/* 175*/ 0x6aa707d7L,0x52f66a61L,0x12d483b1L,0x96435b5eL,0x3e75802bL, X/* 180*/ 0x3ba52b33L,0xa99f51a5L,0xbda1e157L,0x78c2e70cL,0xfcae7ce0L, X/* 185*/ 0xd1602267L,0x2affac4dL,0x4a510947L,0x0ab2b83aL,0x7a04e579L, X/* 190*/ 0x340dfd80L,0xb916e922L,0xe29d5e9bL,0xf5624af4L,0x4ca9d9afL, X/* 195*/ 0x6bbd2cfeL,0xe3b7f620L,0xc2746e07L,0x5b42b9b6L,0xa06919bcL, X/* 200*/ 0xf0f2c40fL,0x72217ab5L,0x14c19df3L,0xf3802daeL,0xe094beb4L, X/* 205*/ 0xa2101affL,0x0529575dL,0x55cdb27cL,0xa33bddb2L,0x6528b37dL, X/* 210*/ 0x740c05dbL,0xe96a62c4L,0x40782846L,0x6d30d706L,0xbbf48e2cL, X/* 215*/ 0xbce2d3deL,0x049e37faL,0x01b5e634L,0x2d886d8dL,0x7e5a2e7eL, X/* 220*/ 0xd7412013L,0x06e90f97L,0xe45d3ebaL,0xb8ad3386L,0x13051b25L, X/* 225*/ 0x0c035354L,0x71c89b75L,0xc638fbd0L,0x197f11a1L,0xef0f08fbL, X/* 230*/ 0xf8448651L,0x38409563L,0x452f4443L,0x5d464d55L,0x03d8764cL, X/* 235*/ 0xb1b8d638L,0xa70bba2fL,0x94b3d210L,0xeb6692a7L,0xd409c2d9L, X/* 240*/ 0x68838526L,0xa6db8a15L,0x751f6c98L,0xde769a88L,0xc9ee4668L, X/* 245*/ 0x1a82a373L,0x0896aa49L,0x42233681L,0xf62c55cbL,0x9f1c5404L, X/* 250*/ 0xf74fb15cL,0xc06e4312L,0x6ffe5d72L,0x8aa8678bL,0x337cd129L, X/* 255*/ 0x8211cefdL X /* End of S Box 0 */ }, X X X { /* Start of S Box 1 */ X X/* 0*/ 0x074a1d09L,0x52a10e5aL,0x9275a3f8L,0x4b82506cL,0x37df7e1bL, X/* 5*/ 0x4c78b3c5L,0xcefab1daL,0xf472267eL,0xb63045f6L,0xd66a1fc0L, X/* 10*/ 0x400298e3L,0x27e60c94L,0x87d2f1b8L,0xdf9e56ccL,0x45cd1803L, X/* 15*/ 0x1d35e098L,0xcce7c736L,0x03483bf1L,0x1f7307d7L,0xc6e8f948L, X/* 20*/ 0xe613c111L,0x3955c6ffL,0x1170ed7cL,0x8e95da41L,0x99c31bf4L, X/* 25*/ 0xa4da8021L,0x7b5f94fbL,0xdd0da51fL,0x6562aa77L,0x556bcb23L, X/* 30*/ 0xdb1bacc6L,0x798040b9L,0xbfe5378fL,0x731d55e6L,0xdaa5bfeeL, X/* 35*/ 0x389bbc60L,0x1b33fba4L,0x9c567204L,0x36c26c68L,0x77ee9d69L, X/* 40*/ 0x8aeb3e88L,0x2d50b5ceL,0x9579e790L,0x42b13cfcL,0x33fbd32bL, X/* 45*/ 0xee0503a7L,0xb5862824L,0x15e41eadL,0xc8412ef7L,0x9d441275L, X/* 50*/ 0x2fcec582L,0x5ff483b7L,0x8f3931dfL,0x2e5d2a7bL,0x49467bf9L, X/* 55*/ 0x0653dea9L,0x2684ce35L,0x7e655e5cL,0xf12771d8L,0xbb15cc67L, X/* 60*/ 0xab097ca1L,0x983dcf52L,0x10ddf026L,0x21267f57L,0x2c58f6b4L, X/* 65*/ 0x31043265L,0x0bab8c01L,0xd5492099L,0xacaae619L,0x944ce54aL, X/* 70*/ 0xf2d13d39L,0xadd3fc32L,0xcda08a40L,0xe2b0d451L,0x9efe08aeL, X/* 75*/ 0xb9d50fd2L,0xea5cd7fdL,0xc9a749ddL,0x13ea2253L,0x832debaaL, X/* 80*/ 0x24be640fL,0xe03e926aL,0x29e01cdeL,0x8bf59f18L,0x0f9d00b6L, X/* 85*/ 0xe1238b46L,0x1e7d8e34L,0x93619adbL,0x76b32f9fL,0xbd972cecL, X/* 90*/ 0xe31fa976L,0xa68fbb10L,0xfb3ba49dL,0x8587c41dL,0xa5add1d0L, X/* 95*/ 0xf3cf84bfL,0xd4e11150L,0xd9ffa6bcL,0xc3f6018cL,0xaef10572L, X/* 100*/ 0x74a64b2fL,0xe7dc9559L,0x2aae35d5L,0x5b6f587fL,0xa9e353feL, X/* 105*/ 0xca4fb674L,0x04ba24a8L,0xe5c6875fL,0xdcbc6266L,0x6bc5c03fL, X/* 110*/ 0x661eef02L,0xed740babL,0x058e34e4L,0xb7e946cfL,0x88698125L, X/* 115*/ 0x72ec48edL,0xb11073a3L,0xa13485ebL,0xa2a2429cL,0xfa407547L, X/* 120*/ 0x50b76713L,0x5418c37dL,0x96192da5L,0x170bb04bL,0x518a021eL, X/* 125*/ 0xb0ac13d1L,0x0963fa2aL,0x4a6e10e1L,0x58472bdcL,0xf7f8d962L, X/* 130*/ 0x979139eaL,0x8d856538L,0xc0997042L,0x48324d7aL,0x447623cbL, X/* 135*/ 0x8cbbe364L,0x6e0c6b0eL,0xd36d63b0L,0x3f244c84L,0x3542c971L, X/* 140*/ 0x2b228dc1L,0xcb0325bbL,0xf8c0d6e9L,0xde11066bL,0xa8649327L, X/* 145*/ 0xfc31f83eL,0x7dd80406L,0xf916dd61L,0xd89f79d3L,0x615144c2L, X/* 150*/ 0xebb45d31L,0x28002958L,0x56890a37L,0xf05b3808L,0x123ae844L, X/* 155*/ 0x86839e16L,0x914b0d83L,0xc506b43cL,0xcf3cba5eL,0x7c60f5c9L, X/* 160*/ 0x22deb2a0L,0x5d9c2715L,0xc77ba0efL,0x4f45360bL,0xc1017d8bL, X/* 165*/ 0xe45adc29L,0xa759909bL,0x412cd293L,0xd7d796b1L,0x00c8ff30L, X/* 170*/ 0x23a34a80L,0x4ec15c91L,0x714e78b5L,0x47b9e42eL,0x78f3ea4dL, X/* 175*/ 0x7f078f5bL,0x346c593aL,0xa3a87a1aL,0x9bcbfe12L,0x3d439963L, X/* 180*/ 0xb2ef6d8eL,0xb8d46028L,0x6c2fd5caL,0x62675256L,0x01f2a2f3L, X/* 185*/ 0xbc96ae0aL,0x709a8920L,0xb4146e87L,0x6308b9e2L,0x64bda7baL, X/* 190*/ 0xafed6892L,0x6037f2a2L,0xf52969e0L,0x0adb43a6L,0x82811400L, X/* 195*/ 0x90d0bdf0L,0x19c9549eL,0x203f6a73L,0x1accaf4fL,0x89714e6dL, X/* 200*/ 0x164d4705L,0x67665f07L,0xec206170L,0x0c2182b2L,0xa02b9c81L, X/* 205*/ 0x53289722L,0xf6a97686L,0x140e4179L,0x9f778849L,0x9a88e15dL, X/* 210*/ 0x25cadb54L,0xd157f36fL,0x32a421c3L,0xb368e98aL,0x5a92cd0dL, X/* 215*/ 0x757aa8d4L,0xc20ac278L,0x08b551c7L,0x849491e8L,0x4dc75ad6L, X/* 220*/ 0x697c33beL,0xbaf0ca33L,0x46125b4eL,0x59d677b3L,0x30d9c8f2L, X/* 225*/ 0xd0af860cL,0x1c7fd0faL,0xfe0ff72cL,0x5c8d6f43L,0x57fdec3bL, X/* 230*/ 0x6ab6ad97L,0xd22adf89L,0x18171785L,0x02bfe22dL,0x6db80917L, X/* 235*/ 0x80b216afL,0xe85e4f9aL,0x7a1c306eL,0x6fc49bf5L,0x3af7a11cL, X/* 240*/ 0x81e215e7L,0x68363fcdL,0x3e9357c8L,0xef52fd55L,0x3b8bab4cL, X/* 245*/ 0x3c8cf495L,0xbefceebdL,0xfd25b714L,0xc498d83dL,0x0d2e1a8dL, X/* 250*/ 0xe9f966acL,0x0e387445L,0x435419e5L,0x5e7ebec4L,0xaa90b8d9L, X/* 255*/ 0xff1a3a96L X /* End of S Box 1 */ }, X X X { /* Start of S Box 2 */ X X/* 0*/ 0x4a8fe4e3L,0xf27d99cdL,0xd04a40caL,0xcb5ff194L,0x3668275aL, X/* 5*/ 0xff4816beL,0xa78b394cL,0x4c6be9dbL,0x4eec38d2L,0x4296ec80L, X/* 10*/ 0xcdce96f8L,0x888c2f38L,0xe75508f5L,0x7b916414L,0x060aa14aL, X/* 15*/ 0xa214f327L,0xbe608dafL,0x1ebbdec2L,0x61f98ce9L,0xe92156feL, X/* 20*/ 0x4f22d7a3L,0x3f76a8d9L,0x559a4b33L,0x38ad2959L,0xf3f17e9eL, X/* 25*/ 0x85e1ba91L,0xe5eba6fbL,0x73dcd48cL,0xf5c3ff78L,0x481b6058L, X/* 30*/ 0x8a3297f7L,0x8f1f3bf4L,0x93785ab2L,0x477a4a5bL,0x6334eb5dL, X/* 35*/ 0x6d251b2eL,0x74a9102dL,0x07e38ffaL,0x915c9c62L,0xccc275eaL, X/* 40*/ 0x6be273ecL,0x3ebddd70L,0xd895796cL,0xdc54a91bL,0xc9afdf81L, X/* 45*/ 0x23633f73L,0x275119b4L,0xb19f6b67L,0x50756e22L,0x2bb152e2L, X/* 50*/ 0x76ea46a2L,0xa353e232L,0x2f596ad6L,0x0b1edb0bL,0x02d3d9a4L, X/* 55*/ 0x78b47843L,0x64893e90L,0x40f0caadL,0xf68d3ad7L,0x46fd1707L, X/* 60*/ 0x1c9c67efL,0xb5e086deL,0x96ee6ca6L,0x9aa34774L,0x1ba4f48aL, X/* 65*/ 0x8d01abfdL,0x183ee1f6L,0x5ff8aa7aL,0x17e4faaeL,0x303983b0L, X/* 70*/ 0x6c08668bL,0xd4ac4382L,0xe6c5849fL,0x92fefb53L,0xc1cac4ceL, X/* 75*/ 0x43501388L,0x441118cfL,0xec4fb308L,0x53a08e86L,0x9e0fe0c5L, X/* 80*/ 0xf91c1525L,0xac45be05L,0xd7987cb5L,0x49ba1487L,0x57938940L, X/* 85*/ 0xd5877648L,0xa958727fL,0x58dfe3c3L,0xf436cf77L,0x399e4d11L, X/* 90*/ 0xf0a5bfa9L,0xef61a33bL,0xa64cac60L,0x04a8d0baL,0x030dd572L, X/* 95*/ 0xb83d320fL,0xcab23045L,0xe366f2f0L,0x815d008dL,0xc897a43aL, X/* 100*/ 0x1d352df3L,0xb9cc571dL,0x8bf38744L,0x72209092L,0xeba124ebL, X/* 105*/ 0xfb99ce5eL,0x3bb94293L,0x28da549cL,0xaab8a228L,0xa4197785L, X/* 110*/ 0x33c70296L,0x25f6259bL,0x5c85da21L,0xdf15bdeeL,0x15b7c7e8L, X/* 115*/ 0xe2abef75L,0xfcc19bc1L,0x417ff868L,0x14884434L,0x62825179L, X/* 120*/ 0xc6d5c11cL,0x0e4705dcL,0x22700de0L,0xd3d2af18L,0x9be822a0L, X/* 125*/ 0x35b669f1L,0xc42bb55cL,0x0a801252L,0x115bf0fcL,0x3cd7d856L, X/* 130*/ 0xb43f5f9dL,0xc2306516L,0xa1231c47L,0xf149207eL,0x5209a795L, X/* 135*/ 0x34b3ccd8L,0x67aefe54L,0x2c83924eL,0x6662cbacL,0x5eedd161L, X/* 140*/ 0x84e681aaL,0x5d57d26bL,0xfa465cc4L,0x7e3ac3a8L,0xbf7c0cc6L, X/* 145*/ 0xe18a9aa1L,0xc32f0a6fL,0xb22cc00dL,0x3d280369L,0x994e554fL, X/* 150*/ 0x68f480d3L,0xadcff5e6L,0x3a8eb265L,0x83269831L,0xbd568a09L, X/* 155*/ 0x4bc8ae6aL,0x69f56d2bL,0x0f17eac8L,0x772eb6c7L,0x9f41343cL, X/* 160*/ 0xab1d0742L,0x826a6f50L,0xfea2097cL,0x1912c283L,0xce185899L, X/* 165*/ 0xe4444839L,0x2d8635d5L,0x65d0b1ffL,0x865a7f17L,0x326d9fb1L, X/* 170*/ 0x59e52820L,0x0090ade1L,0x753c7149L,0x9ddd8b98L,0xa5a691daL, X/* 175*/ 0x0d0382bbL,0x8904c930L,0x086cb000L,0x6e69d3bdL,0x24d4e7a7L, X/* 180*/ 0x05244fd0L,0x101a5e0cL,0x6a947dcbL,0xe840f77bL,0x7d0c5003L, X/* 185*/ 0x7c370f1fL,0x805245edL,0xe05e3d3fL,0x7906880eL,0xbabfcd35L, X/* 190*/ 0x1a7ec697L,0x8c052324L,0x0c6ec8dfL,0xd129a589L,0xc7a75b02L, X/* 195*/ 0x12d81de7L,0xd9be2a66L,0x1f4263abL,0xde73fdb6L,0x2a00680aL, X/* 200*/ 0x56649e36L,0x3133ed55L,0x90fa0bf2L,0x2910a02aL,0x949d9d46L, X/* 205*/ 0xa0d1dcddL,0xcfc9b7d4L,0xd2677be5L,0x95cb36b3L,0x13cd9410L, X/* 210*/ 0xdbf73313L,0xb7c6e8c0L,0xf781414bL,0x510b016dL,0xb0de1157L, X/* 215*/ 0xd6b0f62cL,0xbb074eccL,0x7f1395b7L,0xee792cf9L,0xea6fd63eL, X/* 220*/ 0x5bd6938eL,0xaf02fc64L,0xdab57ab8L,0x8edb3784L,0x8716318fL, X/* 225*/ 0x164d1a01L,0x26f26141L,0xb372e6b9L,0xf8fc2b06L,0x7ac00e04L, X/* 230*/ 0x3727b89aL,0x97e9bca5L,0x9c2a742fL,0xbc3b1f7dL,0x7165b471L, X/* 235*/ 0x609b4c29L,0x20925351L,0x5ae72112L,0x454be5d1L,0xc0ffb95fL, X/* 240*/ 0xdd0ef919L,0x6f2d70c9L,0x0974c5bfL,0x98aa6263L,0x01d91e4dL, X/* 245*/ 0x2184bb6eL,0x70c43c1eL,0x4d435915L,0xae7b8523L,0xb6fb06bcL, X/* 250*/ 0x5431ee76L,0xfdbc5d26L,0xed77493dL,0xc5712ee4L,0xa8380437L, X/* 255*/ 0x2eef261aL X /* End of S Box 2 */ }, X X X { /* Start of S Box 3 */ X X/* 0*/ 0x5a79392bL,0xb8af32c2L,0x41f7720aL,0x833a61ecL,0x13dfedacL, X/* 5*/ 0xc4990bc4L,0xdc0f54bcL,0xfedd5e88L,0x80da1881L,0x4dea1afdL, X/* 10*/ 0xfd402cc6L,0xae67cc7aL,0xc5238525L,0x8ea01254L,0xb56b9bd5L, X/* 15*/ 0x862fbd6dL,0xac8575d3L,0x6fba3714L,0xda7ebf46L,0x59cd5238L, X/* 20*/ 0x8ac9dbfeL,0x353729fcL,0xe497d7f2L,0xc3ab84e0L,0xf05a114bL, X/* 25*/ 0x7b887a75L,0xedc603ddL,0x5e6fe680L,0x2c84b399L,0x884eb1daL, X/* 30*/ 0x1cb8c8bfL,0xaa51098aL,0xc862231cL,0x8bac2221L,0x21b387e5L, X/* 35*/ 0x208a430dL,0x2a3f0f8bL,0xa5ff9cd2L,0x6012a2eaL,0x147a9ee7L, X/* 40*/ 0xf62a501dL,0xb4b2e51aL,0x3ef3484cL,0xc0253c59L,0x2b82b536L, X/* 45*/ 0x0aa9696bL,0xbe0c109bL,0xc70b7929L,0xce3e8a19L,0x2f66950eL, X/* 50*/ 0x459f1c2cL,0xe68fb93dL,0xa3c3ff3eL,0x62b45c62L,0x300991cbL, X/* 55*/ 0x01914c57L,0x7f7bc06aL,0x182831f5L,0xe7b74bcaL,0xfa50f6d0L, X/* 60*/ 0x523caa61L,0xe3a7cf05L,0xe9e41311L,0x280a21d1L,0x6a4297e1L, X/* 65*/ 0xf24dc67eL,0xfc3189e6L,0xb72bf34fL,0x4b1e67afL,0x543402ceL, X/* 70*/ 0x79a59867L,0x0648e02aL,0x00a3ac17L,0xc6208d35L,0x6e7f5f76L, X/* 75*/ 0xa45bb4beL,0xf168fa63L,0x3f4125f3L,0xf311406fL,0x02706565L, X/* 80*/ 0xbfe58022L,0x0cfcfdd9L,0x0735a7f7L,0x8f049092L,0xd98edc27L, X/* 85*/ 0xf5c5d55cL,0xe0f201dbL,0x0dcafc9aL,0x7727fb79L,0xaf43abf4L, X/* 90*/ 0x26e938c1L,0x401b26a6L,0x900720faL,0x2752d97bL,0xcff1d1b3L, X/* 95*/ 0xa9d9e424L,0x42db99abL,0x6cf8be5fL,0xe82cebe3L,0x3afb733bL, X/* 100*/ 0x6b734eb6L,0x1036414aL,0x975f667cL,0x049d6377L,0xba587c60L, X/* 105*/ 0xb1d10483L,0xde1aefccL,0x1129d055L,0x72051e91L,0x6946d623L, X/* 110*/ 0xf9e86ea7L,0x48768c00L,0xb0166c93L,0x9956bbf0L,0x1f1f6d84L, X/* 115*/ 0xfb15e18eL,0x033b495dL,0x56e3362eL,0x4f44c53cL,0x747cba51L, X/* 120*/ 0x89d37872L,0x5d9c331bL,0xd2ef9fa8L,0x254917f8L,0x1b106f47L, X/* 125*/ 0x37d75553L,0xb3f053b0L,0x7dccd8efL,0xd30eb802L,0x5889f42dL, X/* 130*/ 0x610206d7L,0x1a7d34a1L,0x92d87dd8L,0xe5f4a315L,0xd1cf0e71L, X/* 135*/ 0xb22dfe45L,0xb901e8ebL,0x0fc0ce5eL,0x2efa60c9L,0x2de74290L, X/* 140*/ 0x36d0c906L,0x381c70e4L,0x4c6da5b5L,0x3d81a682L,0x7e381f34L, X/* 145*/ 0x396c4f52L,0x95ad5901L,0x1db50c5aL,0x29982e9eL,0x1557689fL, X/* 150*/ 0x3471ee42L,0xd7e2f7c0L,0x8795a1e2L,0xbc324d8dL,0xe224c3c8L, X/* 155*/ 0x12837e39L,0xcdee3d74L,0x7ad2143fL,0x0e13d40cL,0x78bd4a68L, X/* 160*/ 0xa2eb194dL,0xdb9451f9L,0x859b71dcL,0x5c4f5b89L,0xca14a8a4L, X/* 165*/ 0xef92f003L,0x16741d98L,0x33aa4444L,0x9e967fbbL,0x092e3020L, X/* 170*/ 0xd86a35b8L,0x8cc17b10L,0xe1bf08aeL,0x55693fc5L,0x7680ad13L, X/* 175*/ 0x1e6546e8L,0x23b6e7b9L,0xee77a4b2L,0x08ed0533L,0x44fd2895L, X/* 180*/ 0xb6393b69L,0x05d6cacfL,0x9819b209L,0xecbbb72fL,0x9a75779cL, X/* 185*/ 0xeaec0749L,0x94a65aeeL,0xbdf52dc3L,0xd6a25d04L,0x82008e4eL, X/* 190*/ 0xa6de160fL,0x9b036afbL,0x228b3a66L,0x5fb10a70L,0xcc338b58L, X/* 195*/ 0x5378a9dfL,0xc908bca9L,0x4959e25bL,0x46909a97L,0x66ae8f6eL, X/* 200*/ 0xdd0683e9L,0x65f994b4L,0x6426cda5L,0xc24b8840L,0x32539da0L, X/* 205*/ 0x63175650L,0xd0c815ffL,0x50cbc41eL,0xf7c774a3L,0x31b0c231L, X/* 210*/ 0x8d0d8116L,0x24bef16cL,0xd555d256L,0xdf47ea8cL,0x6d21eccdL, X/* 215*/ 0xa887a012L,0x84542aedL,0xa7b9c1bdL,0x914c1bb1L,0xa0d5b67dL, X/* 220*/ 0x438ce937L,0x7030f873L,0x71f6b0c7L,0x574576baL,0xf8bc4541L, X/* 225*/ 0x9c61d348L,0x1960579dL,0x17c4daadL,0x96a4cb0bL,0xc193f2f6L, X/* 230*/ 0x756eafa2L,0x7c1d2f94L,0xf4fe2b43L,0xcb86e33aL,0xebd4c728L, X/* 235*/ 0x9d18ae64L,0x9fe13e30L,0x3ce0f5deL,0xaba1f985L,0xaddc2718L, X/* 240*/ 0x68ce6278L,0xd45e241fL,0xa15c82b7L,0x3b2293d4L,0x739edd32L, X/* 245*/ 0x674a6bf1L,0x5b5d587fL,0x4772deaaL,0x4a63968fL,0x0be68686L, X/* 250*/ 0x513d6426L,0x939a4787L,0xbba89296L,0x4ec20007L,0x818d0d08L, X/* 255*/ 0xff64dfd6L X /* End of S Box 3 */ }, X X X { /* Start of S Box 4 */ X X/* 0*/ 0xcb2297cbL,0xdb48a144L,0xa16cbe4bL,0xbbea1d6cL,0x5af6b6b7L, X/* 5*/ 0x8a8110b6L,0xf9236ef9L,0xc98f83e6L,0x0f9c65b8L,0x252d4a89L, X/* 10*/ 0xa497f068L,0xa5d7ed2dL,0x94c22845L,0x9da1c8c4L,0xe27c2e2eL, X/* 15*/ 0x6e8ba2b4L,0xc3dd17fbL,0x498cd482L,0x0dfe6a9fL,0xb0705829L, X/* 20*/ 0x9a1e6dc1L,0xf829717cL,0x07bb8e3aL,0xda3c0b02L,0x1af82fc7L, X/* 25*/ 0x73b70955L,0x7a04379cL,0x5ee20a28L,0x83712ae5L,0xf4c47c6dL, X/* 30*/ 0xdf72ba56L,0xd794858dL,0x8c0cf709L,0x18f0f390L,0xb6c69b35L, X/* 35*/ 0xbf2f01dbL,0x2fa74dcaL,0xd0cd9127L,0xbde66cecL,0x3deebd46L, X/* 40*/ 0x57c88fc3L,0xcee1406fL,0x0066385aL,0xf3c3444fL,0x3a79d5d5L, X/* 45*/ 0x75751eb9L,0x3e7f8185L,0x521c2605L,0xe1aaab6eL,0x38ebb80fL, X/* 50*/ 0xbee7e904L,0x61cb9647L,0xea54904eL,0x05ae00e4L,0x2d7ac65fL, X/* 55*/ 0x087751a1L,0xdcd82915L,0x0921ee16L,0xdd86d33bL,0xd6bd491aL, X/* 60*/ 0x40fbadf0L,0x4232cbd2L,0x33808d10L,0x39098c42L,0x193f3199L, X/* 65*/ 0x0bc1e47aL,0x4a82b149L,0x02b65a8aL,0x104cdc8eL,0x24a8f52cL, X/* 70*/ 0x685c6077L,0xc79f95c9L,0x1d11fe50L,0xc08dafcdL,0x7b1a9a03L, X/* 75*/ 0x1c1f11d8L,0x84250e7fL,0x979db248L,0xebdc0501L,0xb9553395L, X/* 80*/ 0xe3c05ea8L,0xb1e51c4cL,0x13b0e681L,0x3b407766L,0x36db3087L, X/* 85*/ 0xee17c9fcL,0x6c53ecf2L,0xadccc58fL,0xc427660bL,0xefd5867dL, X/* 90*/ 0x9b6d54a5L,0x6ff1aeffL,0x8e787952L,0x9e2bffe0L,0x8761d034L, X/* 95*/ 0xe00bdbadL,0xae99a8d3L,0xcc03f6e2L,0xfd0ed807L,0x0e508ae3L, X/* 100*/ 0xb74182abL,0x4349245dL,0xd120a465L,0xb246a641L,0xaf3b7ab0L, X/* 105*/ 0x2a6488bbL,0x4b3a0d1fL,0xe7c7e58cL,0x3faff2ebL,0x90445ffdL, X/* 110*/ 0xcf38c393L,0x995d07e7L,0xf24f1b36L,0x356f6891L,0x6d6ebcbeL, X/* 115*/ 0x8da9e262L,0x50fd520eL,0x5bca9e1eL,0x37472cf3L,0x69075057L, X/* 120*/ 0x7ec5fdedL,0x0cab892aL,0xfb2412baL,0x1728debfL,0xa000a988L, X/* 125*/ 0xd843ce79L,0x042e20ddL,0x4fe8f853L,0x56659c3cL,0x2739d119L, X/* 130*/ 0xa78a6120L,0x80960375L,0x70420611L,0x85e09f78L,0xabd17e96L, X/* 135*/ 0x1b513eafL,0x1e01eb63L,0x26ad2133L,0xa890c094L,0x7613cf60L, X/* 140*/ 0x817e781bL,0xa39113d7L,0xe957fa58L,0x4131b99eL,0x28b1efdaL, X/* 145*/ 0x66acfba7L,0xff68944aL,0x77a44fd1L,0x7f331522L,0x59ffb3faL, X/* 150*/ 0xa6df935bL,0xfa12d9dfL,0xc6bf6f3fL,0x89520cf6L,0x659edd6aL, X/* 155*/ 0x544da739L,0x8b052538L,0x7c30ea21L,0xc2345525L,0x15927fb2L, X/* 160*/ 0x144a436bL,0xba107b8bL,0x1219ac97L,0x06730432L,0x31831ab3L, X/* 165*/ 0xc55a5c24L,0xaa0fcd3eL,0xe5606be8L,0x5c88f19bL,0x4c0841eeL, X/* 170*/ 0x1fe37267L,0x11f9c4f4L,0x9f1b9daeL,0x864e76d0L,0xe637c731L, X/* 175*/ 0xd97d23a6L,0x32f53d5cL,0xb8161980L,0x93fa0f84L,0xcaef0870L, X/* 180*/ 0x8874487eL,0x98f2cc73L,0x645fb5c6L,0xcd853659L,0x2062470dL, X/* 185*/ 0x16ede8e9L,0x6b06dab5L,0x78b43900L,0xfc95b786L,0x5d8e7de1L, X/* 190*/ 0x465b5954L,0xfe7ba014L,0xf7d23f7bL,0x92bc8b18L,0x03593592L, X/* 195*/ 0x55cef4f7L,0x74b27317L,0x79de1fc2L,0xc8a0bfbdL,0x229398ccL, X/* 200*/ 0x62a602ceL,0xbcb94661L,0x5336d206L,0xd2a375feL,0x6a6ab483L, X/* 205*/ 0x4702a5a4L,0xa2e9d73dL,0x23a2e0f1L,0x9189140aL,0x581d18dcL, X/* 210*/ 0xb39a922bL,0x82356212L,0xd5f432a9L,0xd356c2a3L,0x5f765b4dL, X/* 215*/ 0x450afcc8L,0x4415e137L,0xe8ecdfbcL,0xed0de3eaL,0x60d42b13L, X/* 220*/ 0xf13df971L,0x71fc5da2L,0xc1455340L,0xf087742fL,0xf55e5751L, X/* 225*/ 0x67b3c1f8L,0xac6b8774L,0x7dcfaaacL,0x95983bc0L,0x489bb0b1L, END_OF_FILE if test 27383 -ne `wc -c <'tripwire-1.1/sigs/snefru/snefruaa'`; then echo shar: \"'tripwire-1.1/sigs/snefru/snefruaa'\" unpacked with wrong size! fi # end of 'tripwire-1.1/sigs/snefru/snefruaa' fi if test -f 'tripwire-1.1/tests/test.escape.sh' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'tripwire-1.1/tests/test.escape.sh'\" else echo shar: Extracting \"'tripwire-1.1/tests/test.escape.sh'\" \(7331 characters\) sed "s/^X//" >'tripwire-1.1/tests/test.escape.sh' <<'END_OF_FILE' X#!/bin/sh X X# $Id: test.escape.sh,v 1.2 1993/12/12 01:39:05 genek Exp $ X# X# Rigorous Tripwire functionality test suite X# X# Gene Kim X# Purdue University X# X XME=$0 XTMPDIR=/tmp/twtest XTWCONFIG=$TMPDIR/tw.config XTWDB=$TMPDIR/tw.db XTRIPWIRE="../src/tripwire -loosedir -c $TWCONFIG -d $TWDB -i all " XNEWFILE="$TMPDIR/d1/@@NEWFILE" XOLDFILE="$TMPDIR/@@OLDFILE" XGROWFILE="$TMPDIR/grow" XSTATFILE="/tmp/twstat"; X XSAVETWDB=/tmp/twXXX XLOGFILE=/tmp/TWLOG X XSTATUSADD=2 # exit status of Tripwire XSTATUSDEL=4 XSTATUSCHA=8 X XMYRUN=/tmp/twrun.sh XMYCHECK=/tmp/twcheck.sh XMYCREATE=/tmp/twcreate.sh XMYINIT=/tmp/twinit.sh XMYCREATETWCONF=/tmp/twctwconf.sh X Xcat << GHK X=== $ME: DESCRIPTION X X This is similar to the Tripwire update tests, but escaped Xfilenames are specifically exercised. X XGHK X Xecho "=== $ME: Setting up auxiliary scripts ===" X X# build run() Xcat << 'EOF' > $MYRUN X echo running Tripwire X echo $* X $* X laststatus=$? X echo $laststatus > $STATFILE XEOF X X# build checkstat() Xcat << 'EOF' > $MYCHECK X DESIRED=$1 X laststatus=`cat $STATFILE` X if [ $laststatus -ne $DESIRED ] X then X echo "=== $ME: test FAILED! (expecting $DESIRED, got $laststatus) ===" X echo "=== ($LOGFILE contains output from test script and Tripwire) ===" X exit 1 X fi XEOF X X#### X XTMPFILES="@1 @2 @3 @4 @5" XTMPDIRS="d1 d2" X X Xcat << 'EOF' > $MYCREATE X #echo "=== $ME: creating test environment ===" X X rm -rf $TMPDIR X mkdir $TMPDIR X for f in $TMPFILES; do X touch $TMPDIR/$f X done X for d in $TMPDIRS; do X mkdir $TMPDIR/$d X for f in $TMPFILES; do X touch $TMPDIR/$d/$f X done X done X touch $OLDFILE X touch $GROWFILE XEOF X Xcat << 'EOF' > $MYINIT X #echo "=== $ME: initializing the database ===" X X touch $TWCONFIG $TWDB $OLDFILE X rm -f databases/* X set _ $TRIPWIRE -initialize -q; shift X ( . $MYRUN ; ) > $LOGFILE X set _ 0; shift X . $MYCHECK X X # move database X rm -f databases/*.old X cp databases/tw.db* $TWDB X X # save a copy X cp ./databases/* $SAVETWDB XEOF X Xcat << 'EOF' > $MYCREATETWCONF X #echo "=== $ME: creating tw.config file ===" X X cat << GHK > $TWCONFIG X# X$TMPDIR R X$TMPDIR/d1 R X$TMPDIR/d2 R X$TWCONFIG X$TMPDIR/grow L> X$TWDB E X# XGHK X XEOF X X# create the tw.config file X# initialize the database X# test update functionality X# case i. updated entry X# case ii. updated file X# case iii. deleted file X# case iv. added file X# X Xecho === $ME: BEGIN === X echo $TRIPWIRE X X . $MYCREATE X . $MYCREATETWCONF X . $MYINIT X Xecho "=== $ME: testing complex UPDATE cases" Xecho "=== $ME: changed ignore-mask (UPDATE file)" X touch $TMPDIR/d1/@1 X set _ $TRIPWIRE -q ; shift X ( . $MYRUN ; ) > $LOGFILE; X set _ $STATUSCHA; shift X . $MYCHECK X X # change the ignore mask X sed "s,$TMPDIR/d1 R,$TMPDIR/d1 L," < $TWCONFIG > /tmp/twx X mv /tmp/twx $TWCONFIG X set _ $TRIPWIRE -d $TWDB -q -update $TMPDIR/d1/@1; shift X ( . $MYRUN ; ) >> $LOGFILE; X set _ 0; shift X . $MYCHECK X X # check to that ignore-masks are different X grep "$TMPDIR/d1" ./databases/* | awk '{ print $3; }' > /tmp/tw1 X grep "$TMPDIR/d1" $TWDB | awk '{ print $3; }' > /tmp/tw2 X echo "diffing" >> $LOGFILE X diff /tmp/tw1 /tmp/tw2 >> $LOGFILE X if [ $? -ne 1 ]; then X echo "=== $ME: test diff FAILED! (expecting 1, got $?) ===" X echo "=== ($LOGFILE contains output from test script and Tripwire) ===" X exit 1 X fi X Xecho "=== $ME: changed ignore-mask (UPDATE entry)" X touch $TMPDIR/d1/@1 X set _ $TRIPWIRE -q ; shift X ( . $MYRUN ; ) > $LOGFILE; X set _ $STATUSCHA; shift X . $MYCHECK X X # change the ignore mask X sed "s,$TMPDIR/d1 R,$TMPDIR/d1 L," < $TWCONFIG > /tmp/twx X mv /tmp/twx $TWCONFIG X set _ $TRIPWIRE -d $TWDB -q -update $TMPDIR/d1; shift X ( . $MYRUN ; ) >> $LOGFILE; X set _ 0; shift X . $MYCHECK X X # check to that ignore-masks are different X grep "$TMPDIR/d1" ./databases/* | awk '{ print $3; }' > /tmp/tw1 X grep "$TMPDIR/d1" $TWDB | awk '{ print $3; }' > /tmp/tw2 X echo "diffing" >> $LOGFILE X diff /tmp/tw1 /tmp/tw2 >> $LOGFILE X if [ $? -ne 1 ]; then X echo "=== $ME: test diff FAILED! (expecting 1, got $?) ===" X echo "=== ($LOGFILE contains output from test script and Tripwire) ===" X exit 1 X fi X Xecho "=== $ME: testing UPDATED files (6 cases)" X . $MYCREATE X . $MYCREATETWCONF X . $MYINIT X Xecho "=== $ME: case 1: update: add new file ===" X cp $SAVETWDB ./databases X touch $NEWFILE X set _ $TRIPWIRE -q ; shift X ( . $MYRUN ; ) > $LOGFILE; X set _ $STATUSADD; shift X . $MYCHECK X set _ $TRIPWIRE -d $TWDB -q -update $NEWFILE; shift X ( . $MYRUN ; ) >> $LOGFILE; X set _ 0; shift X . $MYCHECK X X # move database X rm -f databases/*.old X cp databases/tw.db* $TWDB X X set _ $TRIPWIRE -q; shift X ( . $MYRUN ; ) >> $LOGFILE; X set _ 0; shift X . $MYCHECK X Xecho "=== $ME: case 2: update: delete file ===" X rm -f $OLDFILE X set _ $TRIPWIRE -q; shift X ( . $MYRUN ; ) > $LOGFILE; X set _ $STATUSDEL; shift X . $MYCHECK X set _ $TRIPWIRE -d $TWDB -q -update $OLDFILE; shift X ( . $MYRUN ; ) >> $LOGFILE; X set _ 0; shift X . $MYCHECK X X # move database X rm -f databases/*.old X cp databases/tw.db* $TWDB X X set _ $TRIPWIRE -q; shift X ( . $MYRUN ; ) >> $LOGFILE; X set _ 0; shift X . $MYCHECK X XCFILE=$TMPDIR/d1/@1 XCDIR=$TMPDIR/d1 X Xecho "=== $ME: case 3: update: update file ===" X touch $CFILE X set _ $TRIPWIRE -q; shift X ( . $MYRUN ; ) > $LOGFILE; X set _ $STATUSCHA; shift X . $MYCHECK X set _ $TRIPWIRE -d $TWDB -q -update $CFILE; shift X ( . $MYRUN ; ) >> $LOGFILE; X set _ 0; shift X . $MYCHECK X X # move database X rm -f databases/*.old X cp databases/tw.db* $TWDB X X set _ $TRIPWIRE -q; shift X ( . $MYRUN ; ) >> $LOGFILE; X set _ 0; shift X . $MYCHECK X Xecho "=== $ME: case 4: nonsense case (skipping) ===" X Xecho "=== $ME: case 6: update: delete entry ===" X rm -rf $CDIR X set _ $TRIPWIRE -q; shift X ( . $MYRUN ; ) > $LOGFILE; X set _ $STATUSDEL; shift X . $MYCHECK X set _ $TRIPWIRE -d $TWDB -q -update $CDIR; shift X ( . $MYRUN ; ) >> $LOGFILE; X set _ 0; shift X . $MYCHECK X X # move database X rm -f databases/*.old X cp databases/tw.db* $TWDB X X set _ $TRIPWIRE -q; shift X ( . $MYRUN ; ) >> $LOGFILE; X set _ 0; shift X . $MYCHECK X Xecho "=== $ME: case 5: update: add entry ===" X mkdir $CDIR X touch $CDIR/@1 X set _ $TRIPWIRE -q ; shift X ( . $MYRUN ; ) > $LOGFILE; X set _ $STATUSADD; shift X . $MYCHECK X set _ $TRIPWIRE -d $TWDB -q -update $CDIR; shift X ( . $MYRUN ; ) >> $LOGFILE; X set _ 0; shift X . $MYCHECK X X # move database X rm -f databases/*.old X cp databases/tw.db* $TWDB X X set _ $TRIPWIRE -q; shift X ( . $MYRUN ; ) >> $LOGFILE; X set _ 0; shift X . $MYCHECK X XCFILE=$TMPDIR/d2/@1 XCDIR=$TMPDIR/d2 X Xecho "=== $ME: case 7: update: update entry ===" X touch $CFILE X set _ $TRIPWIRE -q; shift X ( . $MYRUN ; ) > $LOGFILE; X set _ $STATUSCHA; shift X . $MYCHECK X set _ $TRIPWIRE -d $TWDB -q -update $CDIR; shift X ( . $MYRUN ; ) >> $LOGFILE; X set _ 0; shift X . $MYCHECK X X # move database X rm -f databases/*.old X cp databases/tw.db* $TWDB X X set _ $TRIPWIRE -q; shift X ( . $MYRUN ; ) >> $LOGFILE ; X set _ 0; shift X . $MYCHECK X Xecho "=== $ME: PASS ===" X X Xecho Xecho END_OF_FILE if test 7331 -ne `wc -c <'tripwire-1.1/tests/test.escape.sh'`; then echo shar: \"'tripwire-1.1/tests/test.escape.sh'\" unpacked with wrong size! fi chmod +x 'tripwire-1.1/tests/test.escape.sh' # end of 'tripwire-1.1/tests/test.escape.sh' fi if test -f 'tripwire-1.1/sigs/snefru/Makefile' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'tripwire-1.1/sigs/snefru/Makefile'\" else echo shar: Extracting \"'tripwire-1.1/sigs/snefru/Makefile'\" \(250 characters\) sed "s/^X//" >'tripwire-1.1/sigs/snefru/Makefile' <<'END_OF_FILE' X# $Id: Makefile,v 1.3 1993/11/22 06:38:25 genek Exp $ X# X# Makefile for snefru wrapper X# X# Gene Kim X# Purdue University X# October 18, 1992 X# X Xall: snefru.o X X.c.o: X $(CC) $(CFLAGS) -c $< X Xclean: X -rm -rf *.o .pure X Xsnefru.o: ../../include/byteorder.h END_OF_FILE if test 250 -ne `wc -c <'tripwire-1.1/sigs/snefru/Makefile'`; then echo shar: \"'tripwire-1.1/sigs/snefru/Makefile'\" unpacked with wrong size! fi # end of 'tripwire-1.1/sigs/snefru/Makefile' fi echo shar: End of archive 10 \(of 25\). cp /dev/null ark10isdone MISSING="" for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 25 archives. echo "Now read tripwire-1.1/README.kits" rm -f ark[1-9]isdone ark[1-9][0-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0