Changeset 52
- Timestamp:
- Jul 24, 2006, 11:01:29 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/docs/Changelog
r51 r52 1 2.2.3: 2 * fix stealth mode (regression in parser), problem reported by 3 Joschi Kuphal 4 1 5 2.2.2 (17-07-2006) 2 6 * minor fixes for regression test scripts -
trunk/src/samhain.c
r34 r52 1449 1449 1450 1450 #if (defined(WITH_GPG) || defined(WITH_PGP)) 1451 /* do nothing -- we exit earlier if error 1452 if (0 != sh_gpg_check_sign (1)) 1453 aud_exit(FIL__, __LINE__, EXIT_FAILURE); 1454 */ 1451 /* do nothing -- we exit earlier if error */ 1455 1452 #else 1456 1453 sh_error_handle ((-1), FIL__, __LINE__, 0, MSG_START_1H, … … 1474 1471 { 1475 1472 #if (defined(WITH_GPG) || defined(WITH_PGP)) 1476 /* do nothing -- we exit earlier if error 1477 if (0 != sh_gpg_check_sign (2)) 1478 aud_exit(FIL__, __LINE__, EXIT_FAILURE); 1479 */ 1480 ; 1473 /* do nothing -- we exit earlier if error */ 1481 1474 #else 1482 1475 sh_error_handle ((-1), FIL__, __LINE__, 0, MSG_START_2H, … … 1489 1482 { 1490 1483 #if (defined(WITH_GPG) || defined(WITH_PGP)) 1491 /* do nothing -- we exit earlier if error 1492 if (0 != sh_gpg_check_sign (1)) 1493 aud_exit(FIL__, __LINE__, EXIT_FAILURE); 1494 */ 1495 ; 1484 /* do nothing -- we exit earlier if error */ 1496 1485 #else 1497 1486 sh_error_handle ((-1), FIL__, __LINE__, 0, MSG_START_1H, -
trunk/src/sh_unix.c
r49 r52 4122 4122 int sh_unix_getline_stealth (SL_TICKET fd, char * str, int len) 4123 4123 { 4124 int add_off, llen;4125 unsigned long off_data = 0;4126 unsigned long max_data = 0;4127 static int stealth_init = BAD;4124 int add_off, llen; 4125 static unsigned long off_data = 0; 4126 static unsigned long max_data = 0; 4127 static int stealth_init = BAD; 4128 4128 4129 4129 SL_ENTER(_("sh_unix_getline_stealth")); … … 4144 4144 } 4145 4145 stealth_init = GOOD; 4146 max_data += off_data; 4146 4147 } 4147 4148 4148 4149 /* --- Seek to proper position. --- 4149 4150 */ 4151 if (off_data >= max_data) 4152 { 4153 dlog(1, FIL__, __LINE__, 4154 _("The capacity of the container image file for the stealth config file seems to be too small. Your config file is likely truncated.\n")); 4155 sh_error_handle ((-1), FIL__, __LINE__, EIO, MSG_P_NODATA, 4156 _("Stealth config file.")); 4157 aud_exit (FIL__, __LINE__, EXIT_FAILURE); 4158 } 4150 4159 sl_seek(fd, off_data); 4151 4160 … … 4154 4163 add_off = hideout_hex_block(fd, (unsigned char *) str, len); 4155 4164 off_data += add_off; 4156 4157 4165 4158 4166 llen = sl_strlen(str); -
trunk/test/testrun_1b.sh
r51 r52 20 20 # 21 21 22 MAXTEST= 2; export MAXTEST22 MAXTEST=3; export MAXTEST 23 23 LOGFILE="$PW_DIR/.samhain_log"; export LOGFILE 24 24 RCFILE="$PW_DIR/testrc_1.dyn"; export RCFILE … … 70 70 [ -z "$quiet" ] && log_msg_fail "extract gpg signed files..."; 71 71 return 1 72 fi 73 74 if test "x$2" = "x"; then 75 : 76 else 77 CONVERT="$2" 78 if test -f "${TOP_SRCDIR}/stealth_template.jpg"; then 79 [ -z "$verbose" ] || log_msg_ok "convert..." 80 "${CONVERT}" +compress "${TOP_SRCDIR}/stealth_template.jpg" stealth_template.ps >/dev/null 81 else 82 [ -z "$quiet" ] && log_msg_fail "cannot find file stealth_template.jpg" 83 return 1 84 fi 85 if [ $? -ne 0 ]; then 86 [ -z "$quiet" ] && log_msg_fail "${CONVERT} +compress ${TOP_SRCDIR}/stealth_template.jpg stealth_template.ps"; 87 return 1 88 fi 89 90 [ -z "$verbose" ] || log_msg_ok "hide..." 91 ./samhain_stealth -s stealth_template.ps "$RCFILE" >/dev/null 92 if [ $? -ne 0 ]; then 93 [ -z "$quiet" ] && log_msg_fail "${CONVERT} +compress ${TOP_SRCDIR}/stealth_template.jpg stealth_template.ps"; 94 return 1 95 fi 96 97 mv -f stealth_template.ps "$RCFILE" 98 if [ $? -ne 0 ]; then 99 [ -z "$quiet" ] && log_msg_fail "mv -f stealth_template.ps $RCFILE"; 100 return 1 101 fi 102 72 103 fi 73 104 … … 171 202 log_skip 2 $MAXTEST 'public PGP key 0x0F571F6C not present' 172 203 else 204 # 205 # ------------- first test ------------- 206 # 173 207 BUILDOPTS="--quiet $TRUST --enable-debug --with-gpg=${GPG} --with-checksum=no --enable-micro-stealth=137 --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE --with-log-file=$PW_DIR/.samhain_log --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file" 174 testrun1b_internal "${BUILDOPTS}" 208 testrun1b_internal "${BUILDOPTS}" 175 209 do_test_1b 176 210 if [ $? -eq 0 ]; then … … 179 213 log_fail 1 $MAXTEST 'gpg signed config/database files' 180 214 fi 215 216 217 # 218 # ------------- second test ------------- 219 # 220 PRECONV=`find_path convert` 221 "${PRECONV}" --help | grep ImageMagick >/dev/null 2>&1 && \ 222 CONVERT="${PRECONV}" 223 224 if [ -z "$CONVERT" ]; then 225 log_skip 2 $MAXTEST 'ImageMagick convert not found in $PATH' 226 else 227 BUILDOPTS="--quiet $TRUST --enable-debug --with-gpg=${GPG} --with-checksum=no --enable-stealth=137 --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE --with-log-file=$PW_DIR/.samhain_log --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file" 228 testrun1b_internal "${BUILDOPTS}" "$CONVERT" 229 do_test_1b 230 if [ $? -eq 0 ]; then 231 log_ok 2 $MAXTEST 'gpg signed config/database files' 232 else 233 log_fail 2 $MAXTEST 'gpg signed config/database files' 234 fi 235 fi 236 237 238 # 239 # ------------- third test ------------- 240 # 181 241 PM=`find_path prelude-manager` 182 242 if [ -z "$PM" ]; then 183 log_skip 2$MAXTEST 'prelude-manager not found in $PATH'243 log_skip 3 $MAXTEST 'prelude-manager not found in $PATH' 184 244 elif [ -z "$doall" ]; then 185 log_skip 2$MAXTEST 'logging to prelude (or use --really-all)'245 log_skip 3 $MAXTEST 'logging to prelude (or use --really-all)' 186 246 else 187 247 BUILDOPTS="--quiet $TRUST --enable-debug --with-prelude --with-gpg=${GPG} --with-checksum=no --enable-micro-stealth=137 --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE --with-log-file=$PW_DIR/.samhain_log --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file" … … 189 249 do_test_1b_2 190 250 if [ $? -eq 0 ]; then 191 log_ok 2$MAXTEST 'logging to prelude'251 log_ok 3 $MAXTEST 'logging to prelude' 192 252 else 193 log_fail 2$MAXTEST 'logging to prelude'253 log_fail 3 $MAXTEST 'logging to prelude' 194 254 fi 195 255 fi
Note:
See TracChangeset
for help on using the changeset viewer.