Changeset 290
- Timestamp:
- Aug 15, 2010, 12:27:47 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile.in
r286 r290 1751 1751 dnmalloc.o: $(srcsrc)/dnmalloc.c Makefile config.h 1752 1752 t-test1.o: $(srcsrc)/t-test1.c Makefile config.h $(srcinc)/malloc.h 1753 sh_port2proc.o: $(srcsrc)/sh_port2proc.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_ error_min.h $(srcinc)/sh_utils.h $(srcinc)/sh_pthread.h1753 sh_port2proc.o: $(srcsrc)/sh_port2proc.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_error_min.h $(srcinc)/sh_pthread.h 1754 1754 sh_log_parse_syslog.o: $(srcsrc)/sh_log_parse_syslog.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_log_check.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h 1755 1755 sh_log_parse_pacct.o: $(srcsrc)/sh_log_parse_pacct.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_log_check.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h -
trunk/aclocal.m4
r255 r290 1196 1196 ]) 1197 1197 if test $pie_cv_cc = yes; then 1198 case "$host_os" in 1199 *cygwin*) 1200 ;; 1201 *) 1198 1202 PIE_CFLAGS="-fPIE" 1199 1203 PIE_LDFLAGS="-pie" 1204 ;; 1205 esac 1200 1206 fi 1201 1207 fi -
trunk/configure.ac
r286 r290 12 12 dnl start 13 13 dnl 14 AM_INIT_AUTOMAKE(samhain, 2.7. 1)14 AM_INIT_AUTOMAKE(samhain, 2.7.2) 15 15 AC_DEFINE([SAMHAIN], 1, [Application is samhain]) 16 16 AC_CANONICAL_HOST … … 232 232 elf.h linux/elf.h \ 233 233 paths.h arpa/nameser.h arpa/nameser_compat.h \ 234 rpc/rpcent.h sys/statvfs.h,234 rpc/rpcent.h rpc/rpc.h sys/statvfs.h, 235 235 [], 236 236 [], -
trunk/depend.dep
r286 r290 68 68 dnmalloc-portable.o: $(srcsrc)/dnmalloc-portable.c Makefile config.h 69 69 dnmalloc.o: $(srcsrc)/dnmalloc.c Makefile config.h 70 sh_port2proc.o: $(srcsrc)/sh_port2proc.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_ error_min.h $(srcinc)/sh_utils.h $(srcinc)/sh_pthread.h70 sh_port2proc.o: $(srcsrc)/sh_port2proc.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_error_min.h $(srcinc)/sh_pthread.h 71 71 sh_log_parse_syslog.o: $(srcsrc)/sh_log_parse_syslog.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_log_check.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h 72 72 sh_log_parse_pacct.o: $(srcsrc)/sh_log_parse_pacct.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_log_check.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h -
trunk/depend.sum
r286 r290 1 35 907733701 3512130170 -
trunk/docs/Changelog
r289 r290 1 1 2.7.2: 2 * sh_utils.c: fixed an endianess issue that prevented cross-verification 3 of email signatures (reported by A. Zangerl) 4 * sh_login_track.c: fix compiler warning (ignored return value 5 of fwrite) 6 * sh_readconf.c: fix comparison of SeverityUserX string 7 (reported by max__) 8 * sh_processcheck.c: sh_prochk_set_maxpid: set retval on success 9 (reported by max__) 10 * fixed some compiler warnings on cygwin 2 11 * sh_extern.c: As reported by T. Luettgert, gcc 4.4.4 on Fedora 13 3 12 will throw a warning if execve is called with a NULL argv pointer. -
trunk/src/sh_login_track.c
r279 r290 285 285 while (entry) 286 286 { 287 fwrite(&(entry->data), sizeof(struct sh_track_entry_data), 1, fp);287 n = fwrite(&(entry->data), sizeof(struct sh_track_entry_data), 1, fp); 288 288 entry = entry->next; 289 289 } -
trunk/src/sh_mail.c
r275 r290 228 228 } 229 229 230 231 theSig = sh_util_siggen (key2, bufc, sl_strlen(bufc), sigbuf, sizeof(sigbuf)); 230 theSig = sh_util_siggen (key2, bufc, sl_strlen(bufc), 231 sigbuf, sizeof(sigbuf)); 232 232 233 if (sl_strncmp (key, 233 234 theSig, -
trunk/src/sh_port2proc.c
r279 r290 24 24 #include <string.h> 25 25 #include <sys/types.h> 26 #include <netinet/in.h> 27 #include <arpa/inet.h> 26 28 #include <unistd.h> 27 29 … … 48 50 /* #define DEBUG_P2P 1 */ 49 51 52 #include "samhain.h" 53 #include "sh_utils.h" 54 50 55 /**************************************************************************** 51 56 * … … 55 60 #if defined(__linux__) || defined(__FreeBSD__) 56 61 57 #include "samhain.h"58 62 #include "sh_error_min.h" 59 #include "sh_utils.h"60 63 #include "sh_pthread.h" 61 64 -
trunk/src/sh_portcheck.c
r257 r290 47 47 48 48 #define PORTMAP 49 #ifdef HAVE_RPC_RPC_H 49 50 #include <rpc/rpc.h> 50 51 #ifdef HAVE_RPC_RPCENT_H … … 53 54 #include <rpc/pmap_clnt.h> 54 55 #include <rpc/pmap_prot.h> 56 #endif 55 57 #include <netdb.h> 56 58 … … 284 286 #endif 285 287 288 #ifdef HAVE_RPC_RPC_H 286 289 static char * sh_getrpcbynumber (int number, char * buf, size_t len) 287 290 { … … 324 327 return NULL; 325 328 } 329 #endif 326 330 327 331 static char * sh_getservbyport (int port, const char * proto_in, char * buf, size_t len) … … 756 760 unsigned long prot) 757 761 { 762 #ifdef HAVE_RPC_RPC_H 758 763 struct pmaplist * head; 759 764 char *r; … … 786 791 while (head != NULL); 787 792 } 788 793 #else 794 (void) port; 795 (void) address; 796 (void) prot; 797 #endif 789 798 return NULL; 790 799 } … … 1665 1674 char * p; 1666 1675 1676 #ifdef HAVE_RPC_RPC_H 1667 1677 p = sh_getrpcbynumber(0, buf, sizeof(buf)); 1668 1678 CuAssertTrue(tc, p == NULL); … … 1677 1687 CuAssertTrue(tc, 0 == strcmp(p, "ypbind")); 1678 1688 CuAssertTrue(tc, 0 == strcmp(buf, "ypbind")); 1689 #endif 1679 1690 1680 1691 p = sh_getservbyport(0, SH_PROTO_STR(IPPROTO_TCP), buf, sizeof(buf)); 1681 1692 CuAssertTrue(tc, p == NULL); 1682 1693 1694 #if !defined(HOST_IS_CYGWIN) 1683 1695 p = sh_getservbyport(22, SH_PROTO_STR(IPPROTO_TCP), buf, sizeof(buf)); 1684 1696 CuAssertPtrNotNull(tc, p); 1685 1697 CuAssertTrue(tc, 0 == strcmp(p, "ssh")); 1686 1698 CuAssertTrue(tc, 0 == strcmp(buf, "ssh")); 1699 #endif 1687 1700 1688 1701 p = sh_getservbyport(13, SH_PROTO_STR(IPPROTO_UDP), buf, sizeof(buf)); -
trunk/src/sh_prelude.c
r283 r290 705 705 #if defined(SH_WITH_SERVER) 706 706 /* when using yule, theres a msg=<... msg=<...> >*/ 707 do { 708 msg = ptr; 709 ptr = get_value(msg, _("msg"), NULL); 710 if ( ! ptr ) { 711 ptr = msg; 712 break; 713 } else { 714 free(msg); 715 } 716 } while (1); 707 while ( (msg = get_value(ptr, _("msg"), NULL)) ) { 708 free(ptr); 709 ptr = msg; 710 } 717 711 #endif 718 712 … … 1231 1225 if ( inet_peer_ip != NULL){ 1232 1226 ret = idmef_target_new_node(target, &node); 1227 if ( ret < 0 ) 1228 goto err; 1233 1229 1234 1230 ret = node_set_address(node, inet_peer_ip); … … 1239 1235 } 1240 1236 else 1237 #endif 1241 1238 if ( idmef_analyzer_get_node(prelude_client_get_analyzer(client)) ) { 1242 1239 idmef_node_ref(idmef_analyzer_get_node(prelude_client_get_analyzer(client))); 1243 1240 idmef_target_set_node(target, idmef_analyzer_get_node(prelude_client_get_analyzer(client))); 1244 1241 } 1245 #else 1246 if ( idmef_analyzer_get_node(prelude_client_get_analyzer(client)) ) { 1247 idmef_node_ref(idmef_analyzer_get_node(prelude_client_get_analyzer(client))); 1248 idmef_target_set_node(target, idmef_analyzer_get_node(prelude_client_get_analyzer(client))); 1249 } 1250 #endif 1242 1251 1243 if ( strstr(message, _("path=")) ) { 1252 1244 #if defined(SH_WITH_CLIENT) || defined(SH_STANDALONE) -
trunk/src/sh_processcheck.c
r258 r290 611 611 sh_prochk_maxpid = value + 1; 612 612 userdef_maxpid = 1; 613 retval = 0; 613 614 } 614 615 -
trunk/src/sh_readconf.c
r286 r290 1393 1393 i = 0; 1394 1394 while (ident[i] != NULL) { 1395 if (sl_strncmp (key, _(ident[i]), sl_strlen(ident[i]) -1) == 0)1395 if (sl_strncmp (key, _(ident[i]), sl_strlen(ident[i])) == 0) 1396 1396 { 1397 1397 good_opt = 0; -
trunk/src/sh_schedule.c
r131 r290 212 212 /*@+charint@*//* Incompatible types for == (char, char): ??? */ 213 213 for (k = 0; k < 3; ++k) 214 if (p[k] != '\0' && tolower( p[k]) == MonNames[j][k]) ++l;214 if (p[k] != '\0' && tolower((int) p[k]) == MonNames[j][k]) ++l; 215 215 /*@-charint@*/ 216 216 if (l == 3) … … 224 224 /*@+charint@*//* Incompatible types for == (char, char): ??? */ 225 225 for (k = 0; k < 3; ++k) 226 if (p[k] != '\0' && tolower( p[k]) == DayNames[j][k]) ++l;226 if (p[k] != '\0' && tolower((int) p[k]) == DayNames[j][k]) ++l; 227 227 /*@-charint@*/ 228 228 if (l == 3) -
trunk/src/sh_unix.c
r279 r290 3508 3508 } 3509 3509 } 3510 #else 3511 (void) buf; 3510 3512 #endif 3511 3513 -
trunk/src/sh_utils.c
r248 r290 871 871 char c[sizeof(long)]; 872 872 } u; 873 #ifdef WORDS_BIGENDIAN 874 unsigned char swap; 875 unsigned char * ii = (unsigned char *) dest; 876 #endif 873 877 874 878 SL_ENTER(_("sh_util_cpylong")); … … 893 897 ++i; 894 898 } 899 #ifdef WORDS_BIGENDIAN 900 swap = ii[0]; ii[0] = ii[3]; ii[3] = swap; 901 swap = ii[1]; ii[1] = ii[2]; ii[2] = swap; 902 #endif 895 903 SL_RET0(_("sh_util_cpylong")); 896 904 } -
trunk/src/sh_utmp.c
r279 r290 916 916 #ifdef HAVE_UTADDR 917 917 /*@-type@*//* ut_addr does exist !!! */ 918 (void) sl_strlcpy((char*)(user->ut_ship), 919 my_inet_ntoa(*(struct in_addr*)&(ut->ut_addr)), 16); 918 { 919 struct in_addr saddr; 920 memcpy (&saddr, &(ut->ut_addr), sizeof(struct in_addr)); 921 (void) sl_strlcpy((char*)(user->ut_ship), 922 my_inet_ntoa(saddr), 16); 923 } 920 924 /*@+type@*/ 921 925 #endif -
trunk/src/slib.c
r279 r290 1028 1028 if (*one && *two) 1029 1029 { 1030 if (tolower( *one) == tolower(*two))1030 if (tolower((int) *one) == tolower((int) *two)) 1031 1031 { 1032 1032 ++one; ++two; 1033 1033 } 1034 else if (tolower( *one) < tolower(*two))1034 else if (tolower((int) *one) < tolower((int) *two)) 1035 1035 return -1; 1036 1036 else
Note:
See TracChangeset
for help on using the changeset viewer.