Changeset 89
- Timestamp:
- Jan 29, 2007, 9:40:44 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.ac
r87 r89 13 13 dnl start 14 14 dnl 15 AM_INIT_AUTOMAKE(samhain, 2.3. 1a)15 AM_INIT_AUTOMAKE(samhain, 2.3.2) 16 16 AC_CANONICAL_HOST 17 17 -
trunk/docs/Changelog
r87 r89 1 2.3.1a: 1 2.3.2: 2 * fix regression in full stealth mode (incorrect comparison of 3 bytes read vs. maximum capacity), reported by B. Fleming 4 5 2.3.1a (21-01-2007): 2 6 * fix incorrect use of sh_gpg_fill_startup if option --with-fp is used 3 7 (reported by zeroXten) -
trunk/docs/HOWTO-client+server-troubleshooting.html
r1 r89 30 30 div.warnblock { 31 31 background: #b6c5f2; color: #000; 32 background: #ffffcc; color: #000; 32 33 margin: 1em; padding: 0 1em 0 1em; 33 34 border-width: 1px; … … 131 132 <br> 132 133 <hr> 134 <div class="warnblock"> 135 <ul> 136 <li>Almost all problems can only be diagnosed correctly by checking the 137 <b>server</b> logs</li> 138 <li>If the server does not write logs, <b>fix this first</b>. For debugging, 139 stop the server, then run it in the foreground with 140 <tt>yule -p info --foreground</tt></li> 141 </div> 133 142 <p> 134 143 This document aims to explain how to diagnose and fix common problems that … … 255 264 the interface used is not the one the client name resolves to. 256 265 </p> 266 257 267 <p> 258 268 If the client uses the wrong interface on a multi-interface machine, … … 264 274 <p> 265 275 If you want to download the config file from the server, you 266 should instead use the corresponding command line 276 should instead use the corresponding command line option 267 277 <tt>--bind-address=</tt><i>IP address</i> 268 278 to select the interface. -
trunk/src/sh_unix.c
r86 r89 4323 4323 4324 4324 4325 int hideout_hex_block(SL_TICKET fd, unsigned char * str, int len); 4325 int hideout_hex_block(SL_TICKET fd, unsigned char * str, int len, 4326 unsigned long * bytes_read); 4326 4327 unsigned long first_hex_block(SL_TICKET fd, unsigned long * max); 4327 4328 … … 4331 4332 int sh_unix_getline_stealth (SL_TICKET fd, char * str, int len) 4332 4333 { 4333 int add_off, llen; 4334 static unsigned long off_data = 0; 4335 static unsigned long max_data = 0; 4334 int add_off = 0, llen; 4335 static unsigned long off_data = 0; 4336 static unsigned long max_data = 0; 4337 static unsigned long bytes_read = 0; 4336 4338 static int stealth_init = BAD; 4337 4339 … … 4358 4360 /* --- Seek to proper position. --- 4359 4361 */ 4360 if ( off_data >= max_data)4362 if (bytes_read >= max_data || add_off < 0) 4361 4363 { 4362 4364 dlog(1, FIL__, __LINE__, … … 4370 4372 /* --- Read one line. --- 4371 4373 */ 4372 add_off = hideout_hex_block(fd, (unsigned char *) str, len );4374 add_off = hideout_hex_block(fd, (unsigned char *) str, len, &bytes_read); 4373 4375 off_data += add_off; 4374 4376 … … 4377 4379 } 4378 4380 4379 int hideout_hex_block(SL_TICKET fd, unsigned char * str, int len) 4381 int hideout_hex_block(SL_TICKET fd, unsigned char * str, int len, 4382 unsigned long * bytes_read) 4380 4383 { 4381 4384 … … 4386 4389 unsigned long here = 0; 4387 4390 unsigned long retval = 0; 4391 unsigned long bread = 0; 4388 4392 4389 4393 SL_ENTER(_("hideout_hex_block")); … … 4410 4414 num = sl_read (fd, &c, 1); 4411 4415 } while (num == 0 && errno == EINTR); 4412 if (num == 0) 4416 if (num > 0) 4417 ++here; 4418 else if (num == 0) 4413 4419 SL_RETURN((0), _("hideout_hex_block")); 4414 ++here; 4420 else 4421 SL_RETURN((-1), _("hideout_hex_block")); 4415 4422 } while (c == '\n' || c == '\t' || c == '\r' || 4416 4423 c == ' '); … … 4426 4433 str[i] &= ~mask[j]; 4427 4434 4435 bread += 1; 4428 4436 } 4429 4437 if (str[i] == '\n') break; … … 4436 4444 str[i+1] = '\0'; /* keep newline and terminate */ 4437 4445 retval += here; 4446 *bytes_read += (bread/8); 4438 4447 4439 4448 SL_RETURN(retval, _("hideout_hex_block")); -
trunk/test/testrun_1a.sh
r27 r89 20 20 # 21 21 22 BUILDOPTS="--quiet $TRUST --enable-debug --enable-xml-log --enable-micro-stealth=137 --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE --with-log-file=$LOGFILE --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file" 23 export BUILDOPTS 22 PREBUILDOPTS="--quiet $TRUST --enable-debug --enable-xml-log --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE --with-log-file=$LOGFILE --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file" 23 export PREBUILDOPTS 24 25 MAXTEST=1; export MAXTEST 26 27 testrun_stealth () 28 { 29 tcount=14 30 31 if test -r "Makefile"; then 32 $MAKE distclean >/dev/null 33 fi 34 35 ${TOP_SRCDIR}/configure ${BUILDOPTS} 36 37 if test x$? = x0; then 38 [ -z "$verbose" ] || log_msg_ok "configure..."; 39 $MAKE >/dev/null 2>>test_log 40 if test x$? = x0; then 41 [ -z "$verbose" ] || log_msg_ok "make..."; 42 else 43 [ -z "$quiet" ] && log_msg_fail "make..."; 44 return 1 45 fi 46 47 else 48 [ -z "$quiet" ] && log_msg_fail "configure..."; 49 return 1 50 fi 51 52 CONVERT=`find_path convert` 53 if [ x"$CONVERT" = x ]; then 54 [ -z "$verbose" ] || log_msg_fail "ImageMagick convert not found"; 55 return 1 56 fi 57 "$CONVERT" --help | grep ImageMagick >/dev/null 2>&1 58 if [ $? -ne 0 ]; then 59 [ -z "$verbose" ] || log_msg_fail "Convert utility is not ImageMagick convert"; 60 return 1 61 fi 62 "${CONVERT}" +compress stealth_template.jpg stealth_template.ps 63 if [ $? -ne 0 ]; then 64 [ -z "$verbose" ] || log_msg_fail "Converting stealth_template.jpg failed"; 65 return 1 66 fi 67 68 $MAKE samhain_stealth >/dev/null 2>>test_log 69 if [ $? -ne 0 ]; then 70 [ -z "$verbose" ] || log_msg_fail "make samhain_stealth"; 71 return 1 72 fi 73 capacity=`./samhain_stealth -i stealth_template.ps | awk '{ print $7 }'` 74 75 prep_init 76 check_err $? ${tcount}; errval=$? 77 if [ $errval -eq 0 ]; then 78 prep_testdata 79 check_err $? ${tcount}; errval=$? 80 fi 81 if [ $errval -eq 0 ]; then 82 prep_testpolicy 1 83 check_err $? ${tcount}; errval=$? 84 fi 85 86 if [ $errval -eq 0 ]; then 87 fill=`cat "${RCFILE}" | wc -c` 88 check_err $? ${tcount}; errval=$? 89 fi 90 if [ $errval -eq 0 ]; then 91 let "capacity = capacity - fill" >/dev/null 92 let "capacity = capacity - 100" >/dev/null 93 until [ "$capacity" -le 0 ] 94 do 95 echo "###############################" >>"${RCFILE}" 96 let "capacity = capacity - 32" >/dev/null 97 done 98 99 ./samhain_stealth -s stealth_template.ps "${RCFILE}" >/dev/null 100 check_err $? ${tcount}; errval=$? 101 fi 102 if [ $errval -eq 0 ]; then 103 cp stealth_template.ps "${RCFILE}" 104 check_err $? ${tcount}; errval=$? 105 fi 106 107 if [ $errval -eq 0 ]; then 108 run_init 109 check_err $? ${tcount}; errval=$? 110 fi 111 if [ $errval -eq 0 ]; then 112 eval mod_testdata_1 113 check_err $? ${tcount}; errval=$? 114 fi 115 if [ $errval -eq 0 ]; then 116 run_check 117 check_err $? ${tcount}; errval=$? 118 fi 119 if [ $errval -eq 0 ]; then 120 eval chk_testdata_1 121 check_err $? ${tcount}; errval=$? 122 fi 123 if [ $testrun1_setup -eq 0 ]; then 124 if [ $errval -eq 0 ]; then 125 run_update 126 check_err $? ${tcount}; errval=$? 127 fi 128 if [ $errval -eq 0 ]; then 129 run_check_after_update 130 check_err $? ${tcount}; errval=$? 131 fi 132 fi 133 134 if [ $errval -eq 0 ]; then 135 [ -z "$quiet" ] && log_ok ${tcount} ${MAXTEST}; 136 fi 137 } 24 138 25 139 testrun1a () 26 140 { 27 141 log_start "RUN STANDALONE W/STEALTH" 28 testrun_internal 142 # 143 # micro-stealth 144 # 145 #BUILDOPTS="$PREBUILDOPTS --enable-micro-stealth=137"; export BUILDOPTS 146 #testrun_internal 147 148 BUILDOPTS="$PREBUILDOPTS --enable-stealth=137"; export BUILDOPTS 149 testrun_stealth 150 29 151 log_end "RUN STANDALONE W/STEALTH" 30 152 return 0
Note:
See TracChangeset
for help on using the changeset viewer.