autosec-devel Mailing List for Automated Security Tools (Page 8)
Brought to you by:
red0x
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(30) |
Aug
(53) |
Sep
(4) |
Oct
(39) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
|
Feb
|
Mar
(1) |
Apr
(31) |
May
(15) |
Jun
(1) |
Jul
(1) |
Aug
(7) |
Sep
(42) |
Oct
(37) |
Nov
(39) |
Dec
(15) |
2004 |
Jan
(10) |
Feb
(17) |
Mar
(2) |
Apr
(56) |
May
(22) |
Jun
(17) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2005 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(10) |
2007 |
Jan
(2) |
Feb
(7) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <re...@us...> - 2003-11-04 23:50:08
|
Update of /cvsroot/autosec/sonar In directory sc8-pr-cvs1:/tmp/cvs-serv20409 Modified Files: Makefile.am Makefile.in Log Message: libltdl make debug fix Index: Makefile.am =================================================================== RCS file: /cvsroot/autosec/sonar/Makefile.am,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Makefile.am 14 Oct 2003 23:40:23 -0000 1.13 --- Makefile.am 4 Nov 2003 23:50:05 -0000 1.14 *************** *** 41,46 **** debug: @list='$(SUBDIRS)'; for subdir in $$list; do \ ! (cd $$subdir && $(MAKE) $@) || exit;\ done; --- 41,48 ---- debug: + cd libltdl && make && cd .. @list='$(SUBDIRS)'; for subdir in $$list; do \ ! if [ "$$subdir" != "libltdl" ]; then \ ! (cd $$subdir && $(MAKE) $@) || exit; fi;\ done; Index: Makefile.in =================================================================== RCS file: /cvsroot/autosec/sonar/Makefile.in,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Makefile.in 14 Oct 2003 23:40:23 -0000 1.28 --- Makefile.in 4 Nov 2003 23:50:05 -0000 1.29 *************** *** 512,517 **** debug: @list='$(SUBDIRS)'; for subdir in $$list; do \ ! (cd $$subdir && $(MAKE) $@) || exit;\ done; --- 512,519 ---- debug: + cd libltdl && make && cd .. @list='$(SUBDIRS)'; for subdir in $$list; do \ ! if [ "$$subdir" != "libltdl" ]; then \ ! (cd $$subdir && $(MAKE) $@) || exit; fi;\ done; |
From: <re...@us...> - 2003-11-04 23:48:44
|
Update of /cvsroot/autosec/sonar/src In directory sc8-pr-cvs1:/tmp/cvs-serv20169/src Modified Files: mutex.c plugin.h service.h target.h Log Message: Documentation update, and dependency fixes Index: mutex.c =================================================================== RCS file: /cvsroot/autosec/sonar/src/mutex.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mutex.c 1 Oct 2003 07:14:38 -0000 1.2 --- mutex.c 4 Nov 2003 23:48:40 -0000 1.3 *************** *** 26,30 **** static const char rcsid[] = "\100$ autosec/sonar: $Id$"; ! int sonar_mutex_init(sonar_mutex_t * mutex, const pthread_mutexattr_t * mutexattr, char *id) --- 26,36 ---- static const char rcsid[] = "\100$ autosec/sonar: $Id$"; ! /* @fn sonar_mutex_init(sonar_mutex_t * mutex, const pthread_mutexattr_t * mutexattr, char *id) ! * Initialize a pthread mutex in a wrapped way that stores an identifier for debugging ! * @param mutex A sonar_mutex_t pointer ! * @param mutexattr A pthread_mutexattr_t pointer ! * @param id User readable mutex ID string ! * @return the same value of pthread_mutex_init ! */ int sonar_mutex_init(sonar_mutex_t * mutex, const pthread_mutexattr_t * mutexattr, char *id) *************** *** 38,41 **** --- 44,54 ---- } + /* @fn sonar_mutext_lock(sonar mutext_t *mutex, char *who) + * Try to lock the mutex, print a message if it blocks. + * If DEBUG is not defined, it just wraps pthread_mutext_lock directly + * @param mutex sonar_mutex_t to try to lock + * @param who name of what function is trying to lock the mutex + * @return same values as pthread_mutex_lock + */ int sonar_mutex_lock(sonar_mutex_t * mutex, char *who) { *************** *** 62,65 **** --- 75,84 ---- } + /* @fn sonar_mutex_unlock(sonar_mutex_t * mutex, char *who) + * Try to unlock the mutex. + * @param mutex Mutex to unlock + * @param who Name of function trying to unlock + * @return same values as pthread_mutext_unlock + */ int sonar_mutex_unlock(sonar_mutex_t * mutex, char *who) { *************** *** 69,72 **** --- 88,96 ---- } + /* @fn sonar_mutex_destroy(sonar_mutex_t * mutex) + * Directly calls pthread_mutex_destroy + * @param mutex Mutex to destroy + * @return same as pthread_mutex_destroy + */ int sonar_mutex_destroy(sonar_mutex_t * mutex) { Index: plugin.h =================================================================== RCS file: /cvsroot/autosec/sonar/src/plugin.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** plugin.h 14 Oct 2003 23:42:26 -0000 1.27 --- plugin.h 4 Nov 2003 23:48:40 -0000 1.28 *************** *** 26,30 **** #include "types.h" #include <string.h> - #include <sys/types.h> #include <inttypes.h> #define DEFAULT_COUNT 1 --- 26,29 ---- *************** *** 103,106 **** --- 102,106 ---- #define PORT_CLOSED 5 #define PORT_FILTERED 6 + #define PORT_UNFILTERED 7 *************** *** 139,142 **** --- 139,144 ---- /// address information struct addrinfo *ainfo; + /// round trip time + double rtt; /// extra data? void *user_data; Index: service.h =================================================================== RCS file: /cvsroot/autosec/sonar/src/service.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** service.h 24 Sep 2003 19:57:17 -0000 1.1 --- service.h 4 Nov 2003 23:48:40 -0000 1.2 *************** *** 22,26 **** #define _SERVICE_H_ ! #include "target.h" int sonar_resolve_service(char *serv, target_t *result); --- 22,26 ---- #define _SERVICE_H_ ! /*#include "target.h"*/ int sonar_resolve_service(char *serv, target_t *result); Index: target.h =================================================================== RCS file: /cvsroot/autosec/sonar/src/target.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** target.h 28 Sep 2003 10:03:06 -0000 1.4 --- target.h 4 Nov 2003 23:48:40 -0000 1.5 *************** *** 22,26 **** #define _TARGET_H_ - #include <netdb.h> #include "plugin.h" --- 22,25 ---- |
From: <re...@us...> - 2003-11-04 23:47:20
|
Update of /cvsroot/autosec/sonar/plugins In directory sc8-pr-cvs1:/tmp/cvs-serv20017/plugins Modified Files: log_file.h Log Message: Fixed some crappy header writing on my part Index: log_file.h =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/log_file.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** log_file.h 14 Oct 2003 23:43:21 -0000 1.4 --- log_file.h 4 Nov 2003 23:47:17 -0000 1.5 *************** *** 36,50 **** #include "error.h" - /// Plugin's plugin_t structure, built by plugin_init - plugin_t pthis; - /// Sonar's sonar_t structure, built by sonar, passed to this plugin - sonar_t *mthis; - /// filename - char *my_file; - /// file pointer - FILE *my_fp; - - /// my last error - int my_errno; // put your definitions here --- 36,39 ---- *************** *** 53,65 **** // make them static and make sure their linkage is "C" void *plugin_init(void *in_data); ! static int plugin_destroy(void); ! static int plugin_args(char opt, char *optarg); ! static int plugin_open(void *c_data, int i_data); ! static int plugin_close(void); ! static int plugin_output(char *msg, va_list * ap); ! static int plugin_results(result_t *result); ! static void plugin_usage(void); ! static void plugin_status(void); ! static int plugin_last_error(void); --- 42,46 ---- // make them static and make sure their linkage is "C" void *plugin_init(void *in_data); ! |
From: <re...@us...> - 2003-11-04 23:43:04
|
Update of /cvsroot/autosec/sonar/plugins In directory sc8-pr-cvs1:/tmp/cvs-serv19337/plugins Modified Files: Makefile.am Makefile.in Log Message: Added XML plugin in makefile Index: Makefile.am =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/Makefile.am,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Makefile.am 1 Oct 2003 07:07:11 -0000 1.13 --- Makefile.am 4 Nov 2003 23:43:00 -0000 1.14 *************** *** 4,8 **** CPPFLAGS = -I$(top_srcdir)/src ! lib_LTLIBRARIES = libsonar_net_icmp.la libsonar_net_ack.la libsonar_inp_random.la libsonar_out_log.la libsonar_net_icmp_la_SOURCES = network_icmp.c network_icmp.h libsonar_net_icmp_la_LIBADD = @LTLIBOBJS@ --- 4,8 ---- CPPFLAGS = -I$(top_srcdir)/src ! lib_LTLIBRARIES = libsonar_net_icmp.la libsonar_net_ack.la libsonar_inp_random.la libsonar_out_log.la libsonar_out_xml.la libsonar_net_icmp_la_SOURCES = network_icmp.c network_icmp.h libsonar_net_icmp_la_LIBADD = @LTLIBOBJS@ *************** *** 16,19 **** --- 16,22 ---- libsonar_out_log_la_SOURCES = log_file.c log_file.h libsonar_out_log_la_LIBADD = @LTLIBOBJS@ + + libsonar_out_xml_la_SOURCES = log_xml.c log_xml.h + libsonar_out_xml_la_LIBADD = @LTLIBOBJS@ clean-generic: Index: Makefile.in =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/Makefile.in,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** Makefile.in 14 Oct 2003 23:40:24 -0000 1.30 --- Makefile.in 4 Nov 2003 23:43:00 -0000 1.31 *************** *** 99,103 **** CPPFLAGS = -I$(top_srcdir)/src ! lib_LTLIBRARIES = libsonar_net_icmp.la libsonar_net_ack.la libsonar_inp_random.la libsonar_out_log.la libsonar_net_icmp_la_SOURCES = network_icmp.c network_icmp.h libsonar_net_icmp_la_LIBADD = @LTLIBOBJS@ --- 99,103 ---- CPPFLAGS = -I$(top_srcdir)/src ! lib_LTLIBRARIES = libsonar_net_icmp.la libsonar_net_ack.la libsonar_inp_random.la libsonar_out_log.la libsonar_out_xml.la libsonar_net_icmp_la_SOURCES = network_icmp.c network_icmp.h libsonar_net_icmp_la_LIBADD = @LTLIBOBJS@ *************** *** 111,114 **** --- 111,117 ---- libsonar_out_log_la_SOURCES = log_file.c log_file.h libsonar_out_log_la_LIBADD = @LTLIBOBJS@ + + libsonar_out_xml_la_SOURCES = log_xml.c log_xml.h + libsonar_out_xml_la_LIBADD = @LTLIBOBJS@ subdir = plugins mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs *************** *** 133,136 **** --- 136,143 ---- am_libsonar_out_log_la_OBJECTS = log_file.lo libsonar_out_log_la_OBJECTS = $(am_libsonar_out_log_la_OBJECTS) + libsonar_out_xml_la_LDFLAGS = + libsonar_out_xml_la_DEPENDENCIES = @LTLIBOBJS@ + am_libsonar_out_xml_la_OBJECTS = log_xml.lo + libsonar_out_xml_la_OBJECTS = $(am_libsonar_out_xml_la_OBJECTS) DEFS = @DEFS@ *************** *** 141,145 **** am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = $(DEPDIR)/error.Plo ./$(DEPDIR)/inp_rand.Plo \ ! @AMDEP_TRUE@ ./$(DEPDIR)/log_file.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/network_icmp.Plo ./$(DEPDIR)/rfc793.Plo COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ --- 148,152 ---- am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = $(DEPDIR)/error.Plo ./$(DEPDIR)/inp_rand.Plo \ ! @AMDEP_TRUE@ ./$(DEPDIR)/log_file.Plo ./$(DEPDIR)/log_xml.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/network_icmp.Plo ./$(DEPDIR)/rfc793.Plo COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ *************** *** 153,159 **** DIST_SOURCES = $(libsonar_inp_random_la_SOURCES) \ $(libsonar_net_ack_la_SOURCES) $(libsonar_net_icmp_la_SOURCES) \ ! $(libsonar_out_log_la_SOURCES) DIST_COMMON = Makefile.am Makefile.in error.c error.h ! SOURCES = $(libsonar_inp_random_la_SOURCES) $(libsonar_net_ack_la_SOURCES) $(libsonar_net_icmp_la_SOURCES) $(libsonar_out_log_la_SOURCES) all: all-am --- 160,166 ---- DIST_SOURCES = $(libsonar_inp_random_la_SOURCES) \ $(libsonar_net_ack_la_SOURCES) $(libsonar_net_icmp_la_SOURCES) \ ! $(libsonar_out_log_la_SOURCES) $(libsonar_out_xml_la_SOURCES) DIST_COMMON = Makefile.am Makefile.in error.c error.h ! SOURCES = $(libsonar_inp_random_la_SOURCES) $(libsonar_net_ack_la_SOURCES) $(libsonar_net_icmp_la_SOURCES) $(libsonar_out_log_la_SOURCES) $(libsonar_out_xml_la_SOURCES) all: all-am *************** *** 202,205 **** --- 209,214 ---- libsonar_out_log.la: $(libsonar_out_log_la_OBJECTS) $(libsonar_out_log_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libsonar_out_log_la_LDFLAGS) $(libsonar_out_log_la_OBJECTS) $(libsonar_out_log_la_LIBADD) $(LIBS) + libsonar_out_xml.la: $(libsonar_out_xml_la_OBJECTS) $(libsonar_out_xml_la_DEPENDENCIES) + $(LINK) -rpath $(libdir) $(libsonar_out_xml_la_LDFLAGS) $(libsonar_out_xml_la_OBJECTS) $(libsonar_out_xml_la_LIBADD) $(LIBS) mostlyclean-compile: *************** *** 212,215 **** --- 221,225 ---- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp_rand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log_file.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log_xml.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network_icmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfc793.Plo@am__quote@ |
From: <re...@us...> - 2003-11-04 23:40:50
|
Update of /cvsroot/autosec/sonar/src In directory sc8-pr-cvs1:/tmp/cvs-serv19030/src Modified Files: error.c error.h log.c log.h Log Message: Documentation plus fixing dependency graphs Index: error.c =================================================================== RCS file: /cvsroot/autosec/sonar/src/error.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** error.c 28 Sep 2003 12:06:41 -0000 1.5 --- error.c 4 Nov 2003 23:40:46 -0000 1.6 *************** *** 36,40 **** #endif ! #include <stdarg.h> /* ANSI C header file */ #ifdef HAVE_SYSLOG_H --- 36,40 ---- #endif ! /*#include <stdarg.h> /* ANSI C header file */ #ifdef HAVE_SYSLOG_H *************** *** 44,47 **** --- 44,50 ---- #include "plugin.h" + extern int errno; + extern sonar_t mthis; + static const char rcsid[] = "\100$ autosec/sonar: $Id$"; *************** *** 50,56 **** ! /* Nonfatal error related to a system call. ! * Print a message and return. */ ! void err_ret(const char *fmt, ...) { --- 53,61 ---- ! /* @fn err_ret(const char *fmt, ...) ! * Nonfatal error related to a system call. ! * Print a message and return. ! * @param fmt printf style format ! */ void err_ret(const char *fmt, ...) { *************** *** 63,68 **** } ! /* Fatal error related to a system call. ! * Print a message and terminate. */ void err_sys(const char *fmt, ...) --- 68,76 ---- } ! /* @fn err_sys(const char *fmt, ...) ! * Fatal error related to a system call. ! * Print a message and terminate. ! * @param fmt printf style format ! */ void err_sys(const char *fmt, ...) *************** *** 76,81 **** } ! /* Fatal error related to a system call. ! * Print a message, dump core, and terminate. */ void err_dump(const char *fmt, ...) --- 84,92 ---- } ! /* fn err_dump(const char *fmt, ...) ! * Fatal error related to a system call. ! * Print a message, dump core, and terminate. ! * @param fmt printf style format ! */ void err_dump(const char *fmt, ...) *************** *** 90,95 **** } ! /* Nonfatal error unrelated to a system call. ! * Print a message and return. */ void err_msg(const char *fmt, ...) --- 101,109 ---- } ! /* @fn err_msg(const char *fmt, ...) ! * Nonfatal error unrelated to a system call. ! * Print a message and return. ! * @param fmt printf style format ! */ void err_msg(const char *fmt, ...) *************** *** 103,108 **** } ! /* Fatal error unrelated to a system call. ! * Print a message and terminate. */ void err_quit(const char *fmt, ...) --- 117,125 ---- } ! /* @fn err_quit(const char *fmt, ...) ! * Fatal error unrelated to a system call. ! * Print a message and terminate. ! * @param fmt printf style format ! */ void err_quit(const char *fmt, ...) Index: error.h =================================================================== RCS file: /cvsroot/autosec/sonar/src/error.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** error.h 28 Sep 2003 12:06:41 -0000 1.4 --- error.h 4 Nov 2003 23:40:46 -0000 1.5 *************** *** 22,31 **** #define _ERROR_H_ ! #include "plugin.h" #define MAXLINE 4096 /* max text line length */ - - extern int errno; - extern sonar_t mthis; void err_ret(const char *fmt, ...); --- 22,28 ---- #define _ERROR_H_ ! /*#include "plugin.h"*/ #define MAXLINE 4096 /* max text line length */ void err_ret(const char *fmt, ...); Index: log.c =================================================================== RCS file: /cvsroot/autosec/sonar/src/log.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** log.c 1 Oct 2003 07:05:10 -0000 1.1 --- log.c 4 Nov 2003 23:40:46 -0000 1.2 *************** *** 18,22 **** #include <syslog.h> #include "sonar.h" ! #include "plugin.h" #include "log.h" --- 18,22 ---- #include <syslog.h> #include "sonar.h" ! /*#include "plugin.h"*/ #include "log.h" *************** *** 47,50 **** --- 47,51 ---- if(flags & LOG_CONSOLE) { + /* if we are forked, dont do this */ if(!mthis.sCon.bFork) { *************** *** 55,58 **** --- 56,60 ---- if(flags & LOG_SLOG) { + /* only print in syslog if we are forked */ if(mthis.sCon.bFork) { *************** *** 73,87 **** va_end(ap); } ! /** \fn int log_plugin_open(plugin_t *log_plugin) ! * Sets a plugin to be used as output ! * \param log_plug Pointer to a plugin_t structure ! * \return SONAR_OK if plugin was opened successfully, SONAR_ERROR if not ! */ ! int log_plugin_open(plugin_t *log_plug) ! { ! /*int i, retval = SONAR_OK;*/ ! ! if(log_plug == NULL) ! return SONAR_ERROR; ! return SONAR_OK; ! } --- 75,77 ---- va_end(ap); } ! Index: log.h =================================================================== RCS file: /cvsroot/autosec/sonar/src/log.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** log.h 1 Oct 2003 07:05:12 -0000 1.1 --- log.h 4 Nov 2003 23:40:46 -0000 1.2 *************** *** 33,42 **** */ void log_write(int flags, char *msg, ...); ! /** \fn int log_plugin_open(plugin_t *log_plugin) ! * Sets a plugin to be used as output ! * \param log_plug Pointer to a plugin_t structure ! * \return SONAR_OK if plugin was opened successfully, SONAR_ERROR if not ! */ ! int log_plugin_open(plugin_t *log_plug); #endif /* !LOG_H_ */ --- 33,37 ---- */ void log_write(int flags, char *msg, ...); ! #endif /* !LOG_H_ */ |
From: <re...@us...> - 2003-11-04 23:35:05
|
Update of /cvsroot/autosec/sonar/src In directory sc8-pr-cvs1:/tmp/cvs-serv18150/src Modified Files: target.c plugin.c Log Message: gcc 2.95 fixes Index: target.c =================================================================== RCS file: /cvsroot/autosec/sonar/src/target.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** target.c 1 Oct 2003 08:18:41 -0000 1.6 --- target.c 4 Nov 2003 23:35:01 -0000 1.7 *************** *** 28,31 **** --- 28,33 ---- #include "sonar.h" + extern sonar_t mthis; + static const char rcsid[] = "\100$ autosec/sonar: $Id$"; *************** *** 138,147 **** { unsigned long retval = 0, longtmp; - assert(target != NULL); - assert(target->addrinfo != NULL); - assert(target->addrinfo->ai_addr != NULL); uint32_t start, end; struct sockaddr_in *sa; sa = (struct sockaddr_in *) target->addrinfo->ai_addr; longtmp = ntohl(sa->sin_addr.s_addr); --- 140,149 ---- { unsigned long retval = 0, longtmp; uint32_t start, end; struct sockaddr_in *sa; + assert(target != NULL); + assert(target->addrinfo != NULL); + assert(target->addrinfo->ai_addr != NULL); sa = (struct sockaddr_in *) target->addrinfo->ai_addr; longtmp = ntohl(sa->sin_addr.s_addr); Index: plugin.c =================================================================== RCS file: /cvsroot/autosec/sonar/src/plugin.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** plugin.c 24 Oct 2003 09:57:06 -0000 1.22 --- plugin.c 4 Nov 2003 23:35:02 -0000 1.23 *************** *** 51,56 **** "\100$ autosec/sonar: $Id$"; ! extern int sonar_rawoutput(char *msg, ...); ! extern int verbose; static int plugin_add(int type, plugin_t * p_data, sonar_t * mthis, void *hptr); --- 51,56 ---- "\100$ autosec/sonar: $Id$"; ! /*woutput(char *msg, ...); ! extern int verbose;*/ static int plugin_add(int type, plugin_t * p_data, sonar_t * mthis, void *hptr); *************** *** 63,67 **** /// plugin id system PID ! int first_pid; /// Number of input plugins unsigned long int num_inp, --- 63,67 ---- /// plugin id system PID ! static int first_pid; /// Number of input plugins unsigned long int num_inp, *************** *** 80,84 **** /** @fn plugin_ready() * Plugin API Internal -- DO NOT CALL FROM PLUGINS\n ! * Checks if the plugin subsystem is ready * @return 1 if the system is ready */ --- 80,85 ---- /** @fn plugin_ready() * Plugin API Internal -- DO NOT CALL FROM PLUGINS\n ! * Checks if the plugin subsystem is ready. Mainly useful if plugin_lists are dynamically allocated ! * As they are not, this function is pretty much pointless. * @return 1 if the system is ready */ *************** *** 102,105 **** --- 103,107 ---- // set the plugin to NULL plugin_list->plug = NULL; + plugin_list->handle = NULL; } *************** *** 111,117 **** static int inline plugin_newid() { ! return (unsigned long int) (first_pid += ((unsigned int) (200.0 * rand() / ! (RAND_MAX + 64.0)))); } --- 113,119 ---- static int inline plugin_newid() { ! return (unsigned long int) ++first_pid; /* (first_pid += ((unsigned int) (200.0 * rand() / ! (RAND_MAX + 64.0))));*/ } *************** *** 135,139 **** int plugin_start(sonar_t * mthis) { - //input_list = plugin_new(); if(!input_list) { --- 137,140 ---- *************** *** 143,147 **** } plugin_init(&input_list[0]); - //output_list = plugin_new(); if(!output_list) { --- 144,147 ---- *************** *** 151,155 **** } plugin_init(&output_list[0]); - //network_list = plugin_new(); if(!network_list) { --- 151,154 ---- *************** *** 171,177 **** int plugin_end() { - //delete [] input_list; - //delete [] output_list; - //delete [] network_list; #ifdef DEBUG err_msg("plugin_end();"); --- 170,173 ---- *************** *** 187,198 **** * @param mthis Pointer to a filled sonar_t structure * @return PLUGIN_OK if ok, PLUGIN_ERROR otherwise */ int plugin_loadall(sonar_t * mthis) { ! // directory to search defined as PLUGINDIR DIR *dir; lt_dlhandle plugin; void *(*plugin_init) (void *); struct stat *my_buf; if((my_buf = get_stats(mthis->my_name)) == NULL) err_sys("could not stat %s", mthis->my_name); --- 183,196 ---- * @param mthis Pointer to a filled sonar_t structure * @return PLUGIN_OK if ok, PLUGIN_ERROR otherwise + * @todo Lock the plugin library while checking permissions, to avoid a race */ int plugin_loadall(sonar_t * mthis) { ! /* directory to search defined as PLUGINDIR */ DIR *dir; lt_dlhandle plugin; void *(*plugin_init) (void *); struct stat *my_buf; + /* try to get the owner and mode of sonar */ if((my_buf = get_stats(mthis->my_name)) == NULL) err_sys("could not stat %s", mthis->my_name); *************** *** 212,226 **** int len = strlen(entry->d_name); log_write(LOG_DBUG, " found %s\n", entry->d_name); if(len < strlen("libsonar")) continue; ! // this code filters out other libraries ! // needed once we went libtool if(strncmp(entry->d_name, "libsonar", strlen("libsonar")) != 0) ! continue; // not the one if((entry->d_name[len - 3] == '.') && (entry->d_name[len - 2] == 's') && (entry->d_name[len - 1] == 'o')) { ! //found it memset(str, 0, 1024); snprintf(str, 1023, "%s/%s", PLUGINDIR, --- 210,225 ---- int len = strlen(entry->d_name); log_write(LOG_DBUG, " found %s\n", entry->d_name); + /* all plugins must have this in their names, at the beginning */ if(len < strlen("libsonar")) continue; ! /* this code filters out other libraries ! needed once we went libtool */ if(strncmp(entry->d_name, "libsonar", strlen("libsonar")) != 0) ! continue; /* not the one */ if((entry->d_name[len - 3] == '.') && (entry->d_name[len - 2] == 's') && (entry->d_name[len - 1] == 'o')) { ! /* found it */ memset(str, 0, 1024); snprintf(str, 1023, "%s/%s", PLUGINDIR, *************** *** 228,232 **** /* check permissions */ ! // XXX: lock, no interrupts to avoid race log_write(LOG_DBUG, " stat(%s, %p);\n",str, &stat_buf); if(stat(str, &stat_buf) < 0) --- 227,231 ---- /* check permissions */ ! /* XXX: lock, no interrupts to avoid race */ log_write(LOG_DBUG, " stat(%s, %p);\n",str, &stat_buf); if(stat(str, &stat_buf) < 0) *************** *** 239,243 **** if(stat_buf.st_uid != my_buf->st_uid) { ! // if they are owned by root, its ok if(stat_buf.st_uid != 0) { --- 238,242 ---- if(stat_buf.st_uid != my_buf->st_uid) { ! /* if they are owned by root, its ok */ if(stat_buf.st_uid != 0) { *************** *** 246,250 **** } } ! // XXX: unlock /* end check */ lt_dlinit(); --- 245,249 ---- } } ! /* XXX: unlock */ /* end check */ lt_dlinit(); *************** *** 280,284 **** else { ! log_write(LOG_DBUG, " %p (ok)\n"); log_write(LOG_DBUG, " plugin_add(%d, %p, %p, %p);\n", plug, plug->type, plug, mthis, plugin); plugin_add(plug->type, plug, --- 279,283 ---- else { ! log_write(LOG_DBUG, " %p (ok)\n", plug); log_write(LOG_DBUG, " plugin_add(%d, %p, %p, %p);\n", plug, plug->type, plug, mthis, plugin); plugin_add(plug->type, plug, *************** *** 297,301 **** } ! #ifndef CLOSEDIR_VOID closedir(dir); #else --- 296,300 ---- } ! #ifdef CLOSEDIR_VOID closedir(dir); #else *************** *** 314,319 **** int plugin_killall(void) { log_write(LOG_DBUG, " plugin_killall();\n"); ! int err = PLUGIN_OK; //get all input, output, network plugins //call the plugin_destroy function --- 313,319 ---- int plugin_killall(void) { + int err = PLUGIN_OK; log_write(LOG_DBUG, " plugin_killall();\n"); ! //get all input, output, network plugins //call the plugin_destroy function *************** *** 347,350 **** --- 347,351 ---- assert(output_list[num_out - 1].plug != NULL); assert(output_list[num_out - 1].plug->plugin_destroy != NULL); + assert(output_list[num_out - 1].plug->plugin_close != NULL); //if plugin is also a network plugin, let that call it destroy function *************** *** 355,358 **** --- 356,362 ---- log_write(LOG_DBUG, " output_list[%d].plug->plugin_destroy();\n", num_out - 1); + if(output_list[num_out -1].plug->ready) + output_list[num_out - + 1].plug->plugin_close(); if((my_err = output_list[num_out - *************** *** 407,415 **** return PLUGIN_ERROR; } ! { ! assert(p_data != NULL); ! assert(mthis != NULL); ! assert(hptr != NULL); ! } if(type & INPUT_PLUGIN) { --- 411,419 ---- return PLUGIN_ERROR; } ! ! assert(p_data != NULL); ! assert(mthis != NULL); ! assert(hptr != NULL); ! if(type & INPUT_PLUGIN) { |
From: <re...@us...> - 2003-11-04 23:35:05
|
Update of /cvsroot/autosec/sonar/plugins In directory sc8-pr-cvs1:/tmp/cvs-serv18150/plugins Modified Files: log_file.c Log Message: gcc 2.95 fixes Index: log_file.c =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/log_file.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** log_file.c 24 Oct 2003 09:57:06 -0000 1.10 --- log_file.c 4 Nov 2003 23:35:01 -0000 1.11 *************** *** 23,26 **** --- 23,48 ---- #include "log_file.h" + /// Plugin's plugin_t structure, built by plugin_init + static plugin_t pthis; + /// Sonar's sonar_t structure, built by sonar, passed to this plugin + static sonar_t *mthis; + /// filename + static char *my_file; + /// file pointer + static FILE *my_fp; + + /// my last error + static uint16_t my_errno; + + static int plugin_destroy(void); + static int plugin_args(char opt, char *optarg); + static int plugin_open(void *c_data, int i_data); + static int plugin_close(void); + static int plugin_output(char *msg, va_list * ap); + static int plugin_results(result_t *result); + static void plugin_usage(void); + static void plugin_status(void); + static int plugin_last_error(void); + static const char rcsid[] = "\100$ autosec/sonar: $Id$"; *************** *** 104,108 **** my_fp = NULL; ! return my_errno; } --- 126,130 ---- my_fp = NULL; ! return PLUGIN_UNLOADED; } *************** *** 188,198 **** { struct sockaddr_in *sa; - assert(result != NULL); int i; assert(result->ainfo != NULL); sa = (struct sockaddr_in *) result->ainfo->ai_addr; ! fprintf(my_fp, "Host %s[%s] results:\n", result->hostname, inet_ntoa(sa->sin_addr)); /* print the port info */ for(i =0; i < 65536; i++) --- 210,220 ---- { struct sockaddr_in *sa; int i; + assert(result != NULL); assert(result->ainfo != NULL); sa = (struct sockaddr_in *) result->ainfo->ai_addr; ! fprintf(my_fp, "Host %s[%s] results:\n", result->ainfo->ai_canonname /*hostname*/, inet_ntoa(sa->sin_addr)); /* print the port info */ for(i =0; i < 65536; i++) *************** *** 209,212 **** --- 231,237 ---- fprintf(my_fp, " port %d state: filtered\n", i); break; + case PORT_UNFILTERED: + fprintf(my_fp, " port %d state: unfiltered\n", i); + break; } } *************** *** 228,232 **** assert(mthis != NULL); assert(mthis->output != NULL); ! if(pthis.ready) mthis->output("standard logfile output loaded::(%s)\n", my_file); --- 253,257 ---- assert(mthis != NULL); assert(mthis->output != NULL); ! if(pthis.ready && pthis.selected) mthis->output("standard logfile output loaded::(%s)\n", my_file); |
From: <re...@us...> - 2003-11-04 21:48:46
|
Update of /cvsroot/autosec/sonar/src In directory sc8-pr-cvs1:/tmp/cvs-serv28634/src Modified Files: util.c Log Message: careless mistake Index: util.c =================================================================== RCS file: /cvsroot/autosec/sonar/src/util.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** util.c 4 Nov 2003 21:40:10 -0000 1.18 --- util.c 4 Nov 2003 21:48:43 -0000 1.19 *************** *** 349,353 **** tmp = (char *) malloc(++len); if(!tmp) ! err_sys("Could not malloc\n".); // clear it memset(tmp, 0, len); --- 349,353 ---- tmp = (char *) malloc(++len); if(!tmp) ! err_sys("Could not malloc\n"); // clear it memset(tmp, 0, len); |
From: <re...@us...> - 2003-11-04 21:40:14
|
Update of /cvsroot/autosec/sonar/src In directory sc8-pr-cvs1:/tmp/cvs-serv26864 Modified Files: util.c Log Message: GCC 2.95 fix Index: util.c =================================================================== RCS file: /cvsroot/autosec/sonar/src/util.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** util.c 1 Oct 2003 08:18:41 -0000 1.17 --- util.c 4 Nov 2003 21:40:10 -0000 1.18 *************** *** 338,341 **** --- 338,343 ---- //so, move the string forward { + + char *tmp; if(i > 0) if(func[i - 1] == '\\') *************** *** 344,350 **** // now we will escape the offending char ! ! // make temp storage, one larger than offending string ! char *tmp = (char *) malloc(++len); // clear it memset(tmp, 0, len); --- 346,353 ---- // now we will escape the offending char ! // make temp storage, one larger than offending string ! tmp = (char *) malloc(++len); ! if(!tmp) ! err_sys("Could not malloc\n".); // clear it memset(tmp, 0, len); |
From: <re...@us...> - 2003-10-31 20:08:30
|
Update of /cvsroot/autosec/sonar/plugins In directory sc8-pr-cvs1:/tmp/cvs-serv24133 Removed Files: passive.c passive.h Log Message: Removed old, unsupported plugin --- passive.c DELETED --- --- passive.h DELETED --- |
From: <re...@us...> - 2003-10-31 18:47:36
|
Update of /cvsroot/autosec/sonar/src In directory sc8-pr-cvs1:/tmp/cvs-serv6370/src Modified Files: sonar.c Log Message: Fixing various documentation and logging functions Index: sonar.c =================================================================== RCS file: /cvsroot/autosec/sonar/src/sonar.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** sonar.c 14 Oct 2003 23:43:57 -0000 1.22 --- sonar.c 31 Oct 2003 18:47:33 -0000 1.23 *************** *** 24,27 **** --- 24,28 ---- #include <assert.h> + #include <stdarg.h> #include "types.h" #include "sonar.h" *************** *** 195,201 **** { plugin_selected++; ! #ifdef DEBUG ! err_msg("found network plugin \'%c\': %s", network_list[i].plug->plugin_char, network_list[i].plug->shortname); ! #endif network_list[i].plug-> selected = true; --- 196,200 ---- { plugin_selected++; ! log_write(LOG_DBUG, "found network plugin \'%c\': %s\n", network_list[i].plug->plugin_char, network_list[i].plug->shortname); network_list[i].plug-> selected = true; *************** *** 231,237 **** input_list[i].plug->plugin_char) { ! #ifdef DEBUG ! err_msg("found input plugin \'%c\': %s", input_list[i].plug->plugin_char, input_list[i].plug->shortname); ! #endif plugin_selected++; input_list[i].plug->selected = --- 230,234 ---- input_list[i].plug->plugin_char) { ! log_write(LOG_DBUG, "found input plugin \'%c\': %s\n", input_list[i].plug->plugin_char, input_list[i].plug->shortname); plugin_selected++; input_list[i].plug->selected = *************** *** 269,275 **** { plugin_selected++; ! #ifdef DEBUG ! err_msg("found output plugin \'%c\': %s", output_list[i].plug->plugin_char, output_list[i].plug->shortname); ! #endif output_list[i].plug-> selected = true; --- 266,270 ---- { plugin_selected++; ! log_write(LOG_DBUG, "found output plugin \'%c\': %s\n", output_list[i].plug->plugin_char, output_list[i].plug->shortname); output_list[i].plug-> selected = true; *************** *** 330,334 **** char *hostname; ! log_write(LOG_DBUG, "no hosts, printing usage"); for(i = 0; i < num_inp; i++) --- 325,329 ---- char *hostname; ! log_write(LOG_DBUG, "no hosts, checking for input plugs, then printing usage\n"); for(i = 0; i < num_inp; i++) *************** *** 448,453 **** return SONAR_ERROR; } ! if(err == PLUGIN_OK) // host online, and scanned ok, so... ! { } --- 443,448 ---- return SONAR_ERROR; } ! if(err == PLUGIN_OK) /* the meaning of this has changed slightly, */ ! { /* it just means everything went alright, no errors */ } *************** *** 514,523 **** * @param msg Format string to output (see printf) * @return SONAR_OK */ int sonar_rawoutput(char *msg, ...) { - if(mthis.sCon.bFork) - return SONAR_OK; va_list ap; va_start(ap, msg); vfprintf(mthis.sCon.oFile, msg, ap); --- 509,520 ---- * @param msg Format string to output (see printf) * @return SONAR_OK + * @todo remove all dependency on this function. Instead, switch to log_write */ int sonar_rawoutput(char *msg, ...) { va_list ap; + if(mthis.sCon.bFork) + return SONAR_OK; + va_start(ap, msg); vfprintf(mthis.sCon.oFile, msg, ap); *************** *** 588,591 **** --- 585,589 ---- err_msg("network_list[%d].plug->plugin_sweep(%p); => %d", plug, targets, status); #endif + /* XXX: add some sort of error reporting here */ } if(status != PLUGIN_OK) *************** *** 595,598 **** --- 593,602 ---- } + /** @fn sonar_result_hook(result_t *results, int num_records) + * @param results A linked list of results. + * @param num_records How many results are in the list + * @return SONAR_OK if all went well + * @todo Fix up plugins to use this function to report results, instead of printing out + */ int sonar_result_hook(result_t *results, int num_records) { |
From: <re...@us...> - 2003-10-25 20:12:47
|
Update of /cvsroot/autosec/sonar In directory sc8-pr-cvs1:/tmp/cvs-serv5234 Modified Files: configure configure.in Log Message: Blanket commit of some updates towards 1.2.1 Index: configure =================================================================== RCS file: /cvsroot/autosec/sonar/configure,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** configure 14 Oct 2003 23:38:59 -0000 1.29 --- configure 24 Oct 2003 09:57:05 -0000 1.30 *************** *** 8148,8154 **** else ! echo "$as_me:$LINENO: checking for dlopen in -lltdl" >&5 ! echo $ECHO_N "checking for dlopen in -lltdl... $ECHO_C" >&6 ! if test "${ac_cv_lib_ltdl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else --- 8148,8154 ---- else ! echo "$as_me:$LINENO: checking for lt_dlopen in -lltdl" >&5 ! echo $ECHO_N "checking for lt_dlopen in -lltdl... $ECHO_C" >&6 ! if test "${ac_cv_lib_ltdl_lt_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else *************** *** 8169,8177 **** /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ ! char dlopen (); int main () { ! dlopen (); ; return 0; --- 8169,8177 ---- /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ ! char lt_dlopen (); int main () { ! lt_dlopen (); ; return 0; *************** *** 8190,8206 **** echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_lib_ltdl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_lib_ltdl_dlopen=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_dlopen" >&5 ! echo "${ECHO_T}$ac_cv_lib_ltdl_dlopen" >&6 ! if test $ac_cv_lib_ltdl_dlopen = yes; then DYNAMIC_LD_LIBS="-lltdl" else --- 8190,8206 ---- echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_lib_ltdl_lt_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_lib_ltdl_lt_dlopen=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlopen" >&5 ! echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlopen" >&6 ! if test $ac_cv_lib_ltdl_lt_dlopen = yes; then DYNAMIC_LD_LIBS="-lltdl" else Index: configure.in =================================================================== RCS file: /cvsroot/autosec/sonar/configure.in,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** configure.in 14 Oct 2003 23:38:59 -0000 1.26 --- configure.in 24 Oct 2003 09:57:05 -0000 1.27 *************** *** 41,45 **** # Checks for libraries. AC_CHECK_FUNCS(lt_dlopen,, ! [AC_CHECK_LIB(ltdl,dlopen, DYNAMIC_LD_LIBS="-lltdl", AC_MSG_ERROR(lt_dlopen not found: You should have libtool dlopen installed.))]) --- 41,45 ---- # Checks for libraries. AC_CHECK_FUNCS(lt_dlopen,, ! [AC_CHECK_LIB(ltdl,lt_dlopen, DYNAMIC_LD_LIBS="-lltdl", AC_MSG_ERROR(lt_dlopen not found: You should have libtool dlopen installed.))]) |
From: <re...@us...> - 2003-10-25 20:11:37
|
Update of /cvsroot/autosec/sonar/plugins In directory sc8-pr-cvs1:/tmp/cvs-serv5234/plugins Modified Files: inp_rand.c inp_rand.h log_file.c network_icmp.c network_icmp.h rfc793.c Log Message: Blanket commit of some updates towards 1.2.1 Index: inp_rand.c =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/inp_rand.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** inp_rand.c 1 Oct 2003 07:07:32 -0000 1.2 --- inp_rand.c 24 Oct 2003 09:57:06 -0000 1.3 *************** *** 32,36 **** /// my last error ! int16_t my_errno; static char my_hostname[25]; --- 32,36 ---- /// my last error ! static int16_t my_errno; static char my_hostname[25]; *************** *** 81,84 **** --- 81,85 ---- pthis.plugin_sweep = NULL; pthis.plugin_output = NULL; + pthis.plugin_results = NULL; pthis.plugin_usage = &plugin_usage; pthis.plugin_status = &plugin_status; *************** *** 112,115 **** --- 113,117 ---- pthis.plugin_sweep = NULL; pthis.plugin_output = NULL; + pthis.plugin_results = NULL; pthis.plugin_usage = NULL; pthis.plugin_status = NULL; *************** *** 156,160 **** static char *myname; char myport[PORT_SIZE]; ! unsigned long int addr, port, len, i; struct in_addr ia; --- 158,163 ---- static char *myname; char myport[PORT_SIZE]; ! unsigned long int addr, len; ! unsigned int port; struct in_addr ia; *************** *** 167,171 **** memset(myport, 0, PORT_SIZE); addr = (unsigned long int) get_random(); ! port = get_random() % 65536; snprintf(myport, PORT_SIZE, "%u", port); --- 170,174 ---- memset(myport, 0, PORT_SIZE); addr = (unsigned long int) get_random(); ! port = get_random() % 65535; snprintf(myport, PORT_SIZE, "%u", port); *************** *** 177,181 **** strncat(hostname, ":", 1); strncat(hostname, myport, strlen(myport)); ! return PLUGIN_OK; --- 180,185 ---- strncat(hostname, ":", 1); strncat(hostname, myport, strlen(myport)); ! if(mthis->sCon.iVerbose > 0) ! mthis->message("Scanning %s\n", hostname); return PLUGIN_OK; *************** *** 207,211 **** } } ! ret = (0x1001 + (unsigned int) (65535.0 * rand() / (RAND_MAX + 0x1001))); return ret; } --- 211,216 ---- } } ! srand((unsigned int) clock()); ! ret = 0x1008 + (unsigned int) (0xfffe * rand() / (RAND_MAX + 1.0)); return ret; } *************** *** 220,222 **** { return my_errno; ! } \ No newline at end of file --- 225,227 ---- { return my_errno; ! } Index: inp_rand.h =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/inp_rand.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** inp_rand.h 28 Sep 2003 10:52:27 -0000 1.1 --- inp_rand.h 24 Oct 2003 09:57:06 -0000 1.2 *************** *** 31,34 **** --- 31,35 ---- #include <sys/time.h> #include <netinet/in.h> + #include <arpa/inet.h> #define PORT_SIZE 40 Index: log_file.c =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/log_file.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** log_file.c 14 Oct 2003 23:43:21 -0000 1.9 --- log_file.c 24 Oct 2003 09:57:06 -0000 1.10 *************** *** 191,194 **** --- 191,196 ---- int i; + assert(result->ainfo != NULL); + sa = (struct sockaddr_in *) result->ainfo->ai_addr; fprintf(my_fp, "Host %s[%s] results:\n", result->hostname, inet_ntoa(sa->sin_addr)); Index: network_icmp.c =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/network_icmp.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** network_icmp.c 14 Oct 2003 23:44:45 -0000 1.28 --- network_icmp.c 24 Oct 2003 09:57:06 -0000 1.29 *************** *** 32,35 **** --- 32,86 ---- static unsigned char done = 0; + /// my last error + static uint16_t my_errno; + /// my socket + static int my_socket, + /// my sequence number + seq_no, seq_no2, + /// lowest sequence number + low_seq, + /// my ICMP type + my_type, + /// my ICMP code + my_code; + + /// ready for use + static bool ready; + /// payload file name + static char *payload_file; + /// number of targets + static unsigned int num_hosts; + /// Timestamp Time zone + struct timezone tz; + /// Timestamp timeval + struct timeval tp; + /// Command to execute + static char *cmd; + + /// Do we want our host list randomized? + static int randomized; + + /// Plugin's plugin_t structure, built by plugin_init + static plugin_t pthis; + /// Sonar's sonar_t structure, built by sonar, passed to this plugin + static sonar_t *mthis; + + static int icmp_end(void); + static int icmp_args(char opt, char *optarg); + static int icmp_leadin(void *c_data, int i_data); + static int icmp_close(void); + static int icmp_sweep(target_t *targets); + static void icmp_usage(void); + static void icmp_status(void); + static int icmp_ping(target_t *target); + static void *recv_thread(void *arg); + static unsigned short checksum(unsigned short *buffer, int size); + static int icmp_last_error(void); + static void inline error(char *x, int y); + static int resptype(int type); + static const char *respstr(int type); + static const char *unreach_codes(int code); + static host_list_t *randomize(host_list_t * in); + /** @fn plugin_init(void *in_data) * Plugin Init function, part of the Plugin API *************** *** 76,89 **** pthis.plugin_sweep = &icmp_sweep; pthis.plugin_output = NULL; pthis.plugin_usage = &icmp_usage; pthis.plugin_status = &icmp_status; pthis.plugin_last_error = &icmp_last_error; ready = false; ! hosts = (host_list_t *) malloc(sizeof(host_list_t)); ! hosts->next = NULL; ! hosts->host = NULL; cmd = NULL; - hosts->ip = 0; - first_host = hosts; num_hosts = 0; my_type = ICMP_ECHO; --- 127,137 ---- pthis.plugin_sweep = &icmp_sweep; pthis.plugin_output = NULL; + pthis.plugin_results = NULL; pthis.plugin_usage = &icmp_usage; pthis.plugin_status = &icmp_status; pthis.plugin_last_error = &icmp_last_error; ready = false; ! cmd = NULL; num_hosts = 0; my_type = ICMP_ECHO; *************** *** 127,130 **** --- 175,179 ---- pthis.plugin_sweep = NULL; pthis.plugin_output = NULL; + pthis.plugin_results = NULL; pthis.plugin_usage = NULL; pthis.plugin_status = NULL; *************** *** 159,186 **** switch (opt) { - case 'r': - randomized = true; - break; - - case 'd': - mthis->pCon.iPostDelay = atoi(optarg); - if(mthis->pCon.iPostDelay < 0) - mthis->pCon.iPostDelay = 0; - break; case 'p': mthis->memput(&payload_file, optarg, strlen(optarg)); break; - case 's': - mthis->pCon.iSize = atoi(optarg); - if(mthis->pCon.iSize > 350) - mthis->pCon.iSize = 350; - break; - case 't': - mthis->pCon.iTTL = atoi(optarg); - break; - case 'e': - mthis->memput(&cmd, optarg, strlen(optarg)); - icmp_escape_shell(cmd); - break; case 'i': mlen = strlen(optarg); --- 208,214 ---- *************** *** 360,364 **** struct recv_t recd; int timeout; - target_t *first_target = targets; assert(targets != NULL); --- 388,391 ---- *************** *** 380,394 **** recd.socket = my_socket; recd.hosts = num_hosts; ! low_seq = seq_no; ! // run the receiving thread recd.start = clock(); ! recd.max = recd.start + (timeout * num_hosts * CLOCKS_PER_SEC) / 1000; ! // XXX: UPDATE to new targeting method ! //hosts = randomize(hosts); if(pthread_create(&tid, &attr, recv_thread, &recd) != 0) err_sys("could not create thread"); ! // hosts != NULL done = 0; while(targets != NULL && counter <= num_hosts) --- 407,426 ---- recd.socket = my_socket; recd.hosts = num_hosts; ! /* this is a broad cast address, not a range */ ! if(mthis->pCon.bBroadcast > 0 && targets->extra_hosts == 0) ! recd.hosts += (unsigned int) mthis->pCon.bBroadcast * 255; ! low_seq = clock(); /*seq_no;*/ // run the receiving thread recd.start = clock(); ! recd.max = recd.start + (timeout * recd.hosts * CLOCKS_PER_SEC) / 1000; ! if(mthis->pCon.iHostDelay > 0) ! recd.max += (mthis->pCon.iHostDelay * recd.hosts * CLOCKS_PER_SEC) / 1000; ! /* add a default magic number to get some extra (late) responses */ ! recd.max += CLOCKS_PER_SEC/2000; /* default is one half extra second */ ! if(pthread_create(&tid, &attr, recv_thread, &recd) != 0) err_sys("could not create thread"); ! done = 0; while(targets != NULL && counter <= num_hosts) *************** *** 403,406 **** --- 435,441 ---- targets = targets->next; counter++; + /* sleep after this host (allows more dest unreachables to come back) */ + if(counter < num_hosts) + usleep(mthis->pCon.iHostDelay * 1000); } done = 1; *************** *** 409,413 **** if(mthis->pCon.iPostDelay) ! sleep(mthis->pCon.iPostDelay); return PLUGIN_OK; } --- 444,448 ---- if(mthis->pCon.iPostDelay) ! usleep(mthis->pCon.iPostDelay * 1000); return PLUGIN_OK; } *************** *** 459,474 **** mthis->output("\n ICMP Scan plugin: requires root priveleges\n"); mthis->output ! (" Usage: [-pr] [-pd delay] [-pp file] [-ps size] [-pt ttl] [-pe cmd] [-pi type] [-pc code] hostname...\n"); ! mthis->output("\r -pr: ping hosts in random order\n"); ! mthis->output("\t -pd: delay for sec seconds after sweeps.\n"); mthis->output ("\t -pp: append contents of file to payload of ICMP packet\n"); - mthis->output("\t -ps: set packet size\n"); - mthis->output("\t -pt: set packet ttl\n"); - mthis->output - ("\t -pe: execute cmd if host is online (will NOT be run as root)\n"); mthis->output("\t -pi: set ICMP type (-pihelp for a list)\n"); mthis->output("\t -pc: set ICMP code\n"); ! mthis->output(" Example: sonar -sI www.google.com\n"); exit(-1); } --- 494,503 ---- mthis->output("\n ICMP Scan plugin: requires root priveleges\n"); mthis->output ! (" Usage: [-pp file] [-pi type] [-pc code] hostname...\n"); mthis->output ("\t -pp: append contents of file to payload of ICMP packet\n"); mthis->output("\t -pi: set ICMP type (-pihelp for a list)\n"); mthis->output("\t -pc: set ICMP code\n"); ! mthis->output(" Example: sonar -sI example.com\n"); exit(-1); } *************** *** 488,506 **** //register struct timeval *tp; char *buf, *datapart; - struct sa dest; ! { ! assert(target != NULL); ! assert(target->entry != NULL); ! assert(target->addrinfo != NULL); ! assert(target->addrinfo->ai_addr != NULL); ! assert(my_socket != 0); ! assert(my_socket != -1); ! } if(mthis->pCon.iSize != 0) total_size += mthis->pCon.iSize; else total_size += 64 + (int) (290.0 * rand() / (RAND_MAX + 64.0)); dlen = total_size - sizeof(icmphdr_); buf = (char *) malloc(total_size); --- 517,536 ---- //register struct timeval *tp; char *buf, *datapart; ! assert(target != NULL); ! assert(target->entry != NULL); ! assert(target->addrinfo != NULL); ! assert(target->addrinfo->ai_addr != NULL); ! assert(my_socket != 0); ! assert(my_socket != -1); + /* set the packet size to specified */ if(mthis->pCon.iSize != 0) total_size += mthis->pCon.iSize; + /* or pick a random size */ else total_size += 64 + (int) (290.0 * rand() / (RAND_MAX + 64.0)); + + /* how much of the packet is data? */ dlen = total_size - sizeof(icmphdr_); buf = (char *) malloc(total_size); *************** *** 512,534 **** memset(buf, 0, total_size); - //this will overwrite some data; - //tp = (struct timeval *) (buf + sizeof(icmphdr_)); - icmp_hdr = (icmphdr_ *) buf; ! icmp_hdr->i_type = my_type; //ICMP_ECHO; ! icmp_hdr->i_code = my_code; //0; icmp_hdr->i_id = (unsigned short) getpid(); icmp_hdr->i_cksum = 0; ! icmp_hdr->i_seq = seq_no2 = low_seq + (int) (25.0 * rand() / (RAND_MAX + 1.0)); ! ! // XXX: not needed! ! dest.family = target->addrinfo->ai_family; ! dest.dport = 0; ! dest.addr = target->addrinfo->ai_addr; ! memset(dest.zero, 0, 8 * sizeof(unsigned char)); datapart = buf + sizeof(icmphdr_); if(!payload_file) { if(mthis->pCon.sPattern) { --- 542,559 ---- memset(buf, 0, total_size); icmp_hdr = (icmphdr_ *) buf; ! icmp_hdr->i_type = my_type; ! icmp_hdr->i_code = my_code; icmp_hdr->i_id = (unsigned short) getpid(); icmp_hdr->i_cksum = 0; ! /* random sequence number, to make fingerprinting this tool harder */ ! /* clock works well, that way we can count round trip time as well */ ! icmp_hdr->i_seq = seq_no2 = clock();/*seq_no2 = low_seq + (int) (25.0 * rand() / (RAND_MAX + 1.0));*/ datapart = buf + sizeof(icmphdr_); + /* no payload */ if(!payload_file) { + /* do we want a pattern? */ if(mthis->pCon.sPattern) { *************** *** 541,544 **** --- 566,570 ---- } } + /* or random garbage */ else memset(datapart, *************** *** 546,549 **** --- 572,576 ---- dlen); } + /* we've got a payload */ else { *************** *** 601,606 **** unsigned short iphdrlen; unsigned long triptime; ! struct timeval tv; //, *tp; ! //struct timezone tz; int bread, ret; char buf[MAX_PACKET], *adr = NULL; --- 628,632 ---- unsigned short iphdrlen; unsigned long triptime; ! struct timeval tv; int bread, ret; char buf[MAX_PACKET], *adr = NULL; *************** *** 616,622 **** memset(&from, 0, sizeof(struct sockaddr_in)); ! //used to be zero ! tv.tv_sec = 0; //(int) (mthis->pCon.iTimeout / 1000); ! tv.tv_usec = 0; // (int) ((mthis->pCon.iTimeout-tv.tv_sec*1000) * 1000); memset(buf, 0, MAX_PACKET); --- 642,647 ---- memset(&from, 0, sizeof(struct sockaddr_in)); ! tv.tv_sec = 0; ! tv.tv_usec = 0; memset(buf, 0, MAX_PACKET); *************** *** 645,652 **** continue; } - gettimeofday(&tv, &(tz)); - - tvsub(&tv, &tp); - triptime = tv.tv_sec * 1000 + (tv.tv_usec / 1000); iphdr = (iphdr_ *) buf; --- 670,673 ---- *************** *** 690,695 **** //keep looking continue; ! } ! if(icmphdr->i_type != resptype(my_type)) { --- 711,725 ---- //keep looking continue; ! }/* ! if(icmphdr->i_id != getpid()) ! { ! //keep looking ! continue; ! }*/ ! /* clock ticks since this packet has been gone */ ! triptime = (clock() - icmphdr->i_seq); ! triptime = (triptime * 1000) / CLOCKS_PER_SEC; /* ms */ ! /* calculating the trip time this way seems to only have ! a resolution of 10 ms */ if(icmphdr->i_type != resptype(my_type)) { *************** *** 701,706 **** icmphdr->i_code); rec->responses++; - /*if(!broadcast || rec->hosts >= 1) - rec->max -= 5; */ } else if(mthis->sCon.iVerbose > 0) --- 731,734 ---- *************** *** 729,733 **** continue; } - //fprintf(stderr, "exiting thread"); free(adr); result = rec->hosts - rec->responses; --- 757,760 ---- Index: network_icmp.h =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/network_icmp.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** network_icmp.h 14 Oct 2003 23:44:45 -0000 1.28 --- network_icmp.h 24 Oct 2003 09:57:06 -0000 1.29 *************** *** 60,68 **** #include <sys/time.h> - /// Plugin's plugin_t structure, built by plugin_init - plugin_t pthis; - /// Sonar's sonar_t structure, built by sonar, passed to this plugin - sonar_t *mthis; - #define ICMP_MIN 8 --- 60,63 ---- *************** *** 75,106 **** - /// my last error - static int my_errno; - /// my socket - static int my_socket, - /// my sequence number - seq_no, seq_no2, - /// lowest sequence number - low_seq, - /// my ICMP type - my_type, - /// my ICMP code - my_code; - - /// ready for use - static bool ready; - /// payload file name - static char *payload_file; - /// number of targets - static unsigned int num_hosts; - /// Timestamp Time zone - struct timezone tz; - /// Timestamp timeval - struct timeval tp; - /// Command to execute - static char *cmd; - - /// Do we want our host list randomized? - static int randomized; /** --- 70,73 ---- *************** *** 192,217 **** }; - /// current host pointer - host_list_t *hosts; - /// header host pointer - host_list_t *first_host; - void *plugin_init(void *in_data); - static int icmp_end(void); - static int icmp_args(char opt, char *optarg); - static int icmp_leadin(void *c_data, int i_data); - static int icmp_close(void); - static int icmp_sweep(target_t *targets); - static void icmp_usage(void); - static void icmp_status(void); - static int icmp_ping(target_t *target); - static void *recv_thread(void *arg); - static unsigned short checksum(unsigned short *buffer, int size); - static int icmp_last_error(void); - static void inline error(char *x, int y); - static int resptype(int type); - static const char *respstr(int type); - static const char *unreach_codes(int code); - static host_list_t *randomize(host_list_t * in); #endif //_ICMP_PLUG_H_ --- 159,163 ---- Index: rfc793.c =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/rfc793.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** rfc793.c 1 Oct 2003 08:18:41 -0000 1.25 --- rfc793.c 24 Oct 2003 09:57:06 -0000 1.26 *************** *** 107,110 **** --- 107,111 ---- pthis.plugin_sweep = &rfc793_sweep; pthis.plugin_output = NULL; + pthis.plugin_results = NULL; pthis.plugin_usage = &plugin_usage; pthis.plugin_status = &plugin_status; *************** *** 143,146 **** --- 144,148 ---- pthis.plugin_sweep = NULL; pthis.plugin_output = NULL; + pthis.plugin_results = NULL; pthis.plugin_usage = NULL; pthis.plugin_status = NULL; *************** *** 292,295 **** --- 294,299 ---- int timeout; + assert(targets != NULL); + // just make sure we, and sonar, are ready for processing if(!pthis.ready || !ready) *************** *** 370,374 **** usleep(mthis->pCon.iPostDelay * 1000); } ! /* XXX: Eventually, I want the receive thread to pass a target_t struct back to */ /* sonar's output function for parsing by output plugins */ return PLUGIN_OK; --- 374,378 ---- usleep(mthis->pCon.iPostDelay * 1000); } ! /* XXX: Eventually, I want the receive thread to pass a result_t struct back to */ /* sonar's output function for parsing by output plugins */ return PLUGIN_OK; *************** *** 481,486 **** int fromlen, my_socket = rec->socket, err_socket = rec->errs, result, retv; struct sockaddr_in from; ! struct hostent *he = NULL; int psuedo = false; assert(my_socket != -1 && my_socket != 0); --- 485,491 ---- int fromlen, my_socket = rec->socket, err_socket = rec->errs, result, retv; struct sockaddr_in from; ! struct addrinfo *ai = NULL; int psuedo = false; + result_t res; assert(my_socket != -1 && my_socket != 0); *************** *** 512,519 **** if(psuedo == true) { ! assert(he != NULL); psuedo = false; ! free(he); } if(FD_ISSET(my_socket, &rfds)) { --- 517,527 ---- if(psuedo == true) { ! assert(ai != NULL); psuedo = false; ! free(ai); } + else + freeaddrinfo(ai); + memset(&res, 0, sizeof(result_t)); if(FD_ISSET(my_socket, &rfds)) { *************** *** 545,549 **** free(adr); ! adr = malloc(4); if(!adr) err_ret("Could not allocate space"); --- 553,558 ---- free(adr); ! adr = malloc(5); ! memset(adr, 0, 5); if(!adr) err_ret("Could not allocate space"); *************** *** 551,557 **** memcpy(adr, &(from.sin_addr.s_addr), 4); - he = gethostbyaddr(adr, 4, AF_INET); ! if(!he) { char *tmp; --- 560,565 ---- memcpy(adr, &(from.sin_addr.s_addr), 4); ! if(getaddrinfo(adr, NULL, NULL, &ai) != 0) { char *tmp; *************** *** 560,569 **** iphdr->ip_src.s_addr; tmp = inet_ntoa(from.sin_addr); ! he = (struct hostent *) ! malloc(sizeof(struct hostent)); ! he->h_name = (char *) malloc(strlen(tmp) + 1); ! memset(he->h_name, 0, strlen(tmp) + 1); ! strncpy(he->h_name, tmp, strlen(tmp)); psuedo = true; } --- 568,589 ---- iphdr->ip_src.s_addr; tmp = inet_ntoa(from.sin_addr); ! ! psuedo = true; + ai = (struct addrinfo *) malloc(sizeof(struct addrinfo)); + if(!ai) + { + fprintf(stderr, "memory dead.\n"); + exit(0); + } + memset(ai, 0, sizeof(struct addrinfo)); + ai->ai_family = PF_INET; + ai->ai_protocol = IPPROTO_TCP; + ai->ai_addrlen = sizeof(struct sockaddr_in); + ai->ai_addr = (struct sockaddr *) malloc(sizeof(struct sockaddr_in)); + memcpy(ai->ai_addr, &(from.sin_addr), sizeof(struct sockaddr_in)); + ai->ai_canonname = (char *) malloc(strlen(tmp) + 1); + memset(ai->ai_canonname, 0, strlen(tmp) + 1); + strncpy(ai->ai_canonname, tmp, strlen(tmp)); } *************** *** 572,579 **** if((tcp->th_flags & TH_RST)) { ! mthis->message ("%s[%s]:%d online & UNfiltered: range: %lu ms ttl: %d size: %d\n", ! he->h_name, inet_ntoa(from.sin_addr), ntohs(tcp->th_sport), triptime, iphdr->ip_ttl, ntohs(iphdr->ip_len)); --- 592,604 ---- if((tcp->th_flags & TH_RST)) { ! res.next = NULL; ! res.hostname = ai->ai_canonname; ! res.ports[ntohs(tcp->th_sport)] = PORT_OPENED; ! res.ainfo = ai; /* XXX: fix my resolver to use getaddrinfo */ ! res.user_data = NULL; /* XXX: maybe include a time stamp */ ! mthis->results(&res, 1); mthis->message ("%s[%s]:%d online & UNfiltered: range: %lu ms ttl: %d size: %d\n", ! ai->ai_canonname, inet_ntoa(from.sin_addr), ntohs(tcp->th_sport), triptime, iphdr->ip_ttl, ntohs(iphdr->ip_len)); *************** *** 583,587 **** if(mthis->pCon.prog != NULL) { ! retv = system(mthis->pCon.prog); /* XXX: remove meta chars!! */ if(WIFSIGNALED(retv) && (WTERMSIG(retv) == SIGINT || WTERMSIG(retv) == SIGQUIT)) --- 608,612 ---- if(mthis->pCon.prog != NULL) { ! retv = system(mthis->pCon.prog); if(WIFSIGNALED(retv) && (WTERMSIG(retv) == SIGINT || WTERMSIG(retv) == SIGQUIT)) *************** *** 648,654 **** from.sin_addr = icmphdr->icmp_ip.ip_dst; ! he = gethostbyaddr(adr, 4, AF_INET); ! ! if(!he) { char *tmp; --- 673,677 ---- from.sin_addr = icmphdr->icmp_ip.ip_dst; ! if(getaddrinfo(adr, NULL, NULL, &ai) != 0) { char *tmp; *************** *** 657,666 **** iphdr->ip_src.s_addr; tmp = inet_ntoa(from.sin_addr); ! he = (struct hostent *) ! malloc(sizeof(struct hostent)); ! he->h_name = (char *) malloc(strlen(tmp) + 1); ! memset(he->h_name, 0, strlen(tmp) + 1); ! strncpy(he->h_name, tmp, strlen(tmp)); psuedo = true; } --- 680,701 ---- iphdr->ip_src.s_addr; tmp = inet_ntoa(from.sin_addr); ! ! psuedo = true; + ai = (struct addrinfo *) malloc(sizeof(struct addrinfo)); + if(!ai) + { + fprintf(stderr, "memory dead.\n"); + exit(0); + } + memset(ai, 0, sizeof(struct addrinfo)); + ai->ai_family = PF_INET; + ai->ai_protocol = IPPROTO_TCP; + ai->ai_addrlen = sizeof(struct sockaddr_in); + ai->ai_addr = (struct sockaddr *) malloc(sizeof(struct sockaddr_in)); + memcpy(ai->ai_addr, &(from.sin_addr), sizeof(struct sockaddr_in)); + ai->ai_canonname = (char *) malloc(strlen(tmp) + 1); + memset(ai->ai_canonname, 0, strlen(tmp) + 1); + strncpy(ai->ai_canonname, tmp, strlen(tmp)); } *************** *** 669,677 **** { case ICMP_UNREACH_PORT: ! assert(he != NULL); mthis->message ("%s[%s]:%d online & filtered: range: %lu ms ttl: %d size: %d\n", ! he->h_name, ! inet_ntoa(from.sin_addr), tcp->th_dport ,triptime, iphdr->ip_ttl, ntohs(iphdr->ip_len)); --- 704,718 ---- { case ICMP_UNREACH_PORT: ! assert(ai != NULL); ! res.next = NULL; ! res.hostname = ai->ai_canonname; ! res.ports[ntohs(tcp->th_dport)] = PORT_FILTERED; ! res.ainfo = ai; /* XXX: fix my resolver to use getaddrinfo */ ! res.user_data = NULL; /* XXX: maybe include a time stamp */ ! mthis->results(&res, 1); mthis->message ("%s[%s]:%d online & filtered: range: %lu ms ttl: %d size: %d\n", ! ai->ai_canonname, ! inet_ntoa(from.sin_addr), ntohs(tcp->th_dport) ,triptime, iphdr->ip_ttl, ntohs(iphdr->ip_len)); *************** *** 679,687 **** break; case ICMP_UNREACH_HOST: ! assert(he != NULL); if(mthis->sCon.iVerbose > 0) mthis->message ("%s[%s] host unreachable\n", ! he->h_name, inet_ntoa(from. sin_addr), --- 720,728 ---- break; case ICMP_UNREACH_HOST: ! assert(ai != NULL); if(mthis->sCon.iVerbose > 0) mthis->message ("%s[%s] host unreachable\n", ! ai->ai_canonname, inet_ntoa(from. sin_addr), *************** *** 693,701 **** break; default: if(mthis->sCon.iVerbose > 1) { mthis->message ("%s[%s]: destination unreachable: %s\n", ! he->h_name, inet_ntoa(from. sin_addr), --- 734,743 ---- break; default: + assert(ai != NULL); if(mthis->sCon.iVerbose > 1) { mthis->message ("%s[%s]: destination unreachable: %s\n", ! ai->ai_canonname, inet_ntoa(from. sin_addr), |
From: <re...@us...> - 2003-10-25 19:35:16
|
Update of /cvsroot/autosec/sonar/src In directory sc8-pr-cvs1:/tmp/cvs-serv5234/src Modified Files: plugin.c Log Message: Blanket commit of some updates towards 1.2.1 Index: plugin.c =================================================================== RCS file: /cvsroot/autosec/sonar/src/plugin.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** plugin.c 14 Oct 2003 23:41:57 -0000 1.21 --- plugin.c 24 Oct 2003 09:57:06 -0000 1.22 *************** *** 192,196 **** // directory to search defined as PLUGINDIR DIR *dir; ! lt_dlhandle *plugin; void *(*plugin_init) (void *); struct stat *my_buf; --- 192,196 ---- // directory to search defined as PLUGINDIR DIR *dir; ! lt_dlhandle plugin; void *(*plugin_init) (void *); struct stat *my_buf; |
From: <re...@us...> - 2003-10-14 23:45:24
|
Update of /cvsroot/autosec/sonar In directory sc8-pr-cvs1:/tmp/cvs-serv30316 Modified Files: README Log Message: Version number update Index: README =================================================================== RCS file: /cvsroot/autosec/sonar/README,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** README 17 Apr 2003 14:50:48 -0000 1.11 --- README 14 Oct 2003 23:45:21 -0000 1.12 *************** *** 1,4 **** ! sonar 1.1.4 :: network reconnaissance by red0x. Read INSTALL for generic instructions on compiling and --- 1,4 ---- ! sonar 1.2.1 :: network reconnaissance by red0x. Read INSTALL for generic instructions on compiling and |
From: <re...@us...> - 2003-10-14 23:44:49
|
Update of /cvsroot/autosec/sonar/plugins In directory sc8-pr-cvs1:/tmp/cvs-serv30177/plugins Modified Files: network_icmp.c network_icmp.h Log Message: Removed useless bloat from icmp plugin Index: network_icmp.c =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/network_icmp.c,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** network_icmp.c 1 Oct 2003 07:08:10 -0000 1.27 --- network_icmp.c 14 Oct 2003 23:44:45 -0000 1.28 *************** *** 772,846 **** /** - * @fn tvsub(register struct timeval *out, register struct timeval *in) - * Subtract one struct timeval from another - * @param out Pointer to destination (will be filled with out - in) - * @param in Pointer to src - */ - static void tvsub(register struct timeval *out, register struct timeval *in) - { - if((out->tv_usec -= in->tv_usec) < 0) - { - out->tv_sec--; - out->tv_usec += 1000000; - } - out->tv_sec -= in->tv_sec; - } - - /** - * @fn icmp_escape_shell(char *func) - * Remove dangerous Meta-characters from a shell command - * @param func Shell command - */ - static void icmp_escape_shell(char *func) - { - int len = strlen(func); - int i = 0; - for(i = 0; i < len; i++) - { - if(func[i] == '>' || func[i] == '<' || - func[i] == ';' || func[i] == '(' || - func[i] == '`' || func[i] == '!' || - func[i] == '|' || func[i] == '&' || - func[i] == '*' || func[i] == '?' || - func[i] == '$' || func[i] == ':' || - func[i] == '=' || func[i] == '#' || - func[i] == '!' || func[i] == '%' || - func[i] == ')' || func[i] == '[' || - func[i] == ']' || func[i] == '{' || func[i] == '}' || - /* somone trying to pass shellcode w/nop's? */ - func[i] == (char) 0x90) - //we want to get rid of these kinds of characters - //so, move the string forward - { - if(i > 0) - if(func[i - 1] == '\\') - continue; - #ifdef DEBUG - err_msg("Found Meta-char(\\%c): escaping\n", func[i]); - #endif - // now we will escape the offending char - - // make temp storage, one larger than offending string - char *tmp = (char *) malloc(++len); - // clear it - memset(tmp, 0, len); - // move the first half of the string to the temp - memmove(tmp, func, i); - // inject the escape char - tmp[i] = '\\'; - // move second half of string to the temp - memmove(&tmp[i + 1], &func[i], len - (i + 1)); - printf("::%s::\n", tmp); - // swap temp and active variables - realloc(func, len + 1); - memset(func, 0, len + 1); - memmove(func, tmp, len); - free(tmp); - - } - } - } - - /** * @fn icmp_last_error() * Return last error code --- 772,775 ---- Index: network_icmp.h =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/network_icmp.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** network_icmp.h 25 Sep 2003 01:24:50 -0000 1.27 --- network_icmp.h 14 Oct 2003 23:44:45 -0000 1.28 *************** *** 208,213 **** static void *recv_thread(void *arg); static unsigned short checksum(unsigned short *buffer, int size); - static void tvsub(register struct timeval *out, register struct timeval *in); - static void icmp_escape_shell(char *func); static int icmp_last_error(void); static void inline error(char *x, int y); --- 208,211 ---- |
From: <re...@us...> - 2003-10-14 23:44:01
|
Update of /cvsroot/autosec/sonar/src In directory sc8-pr-cvs1:/tmp/cvs-serv29978/src Modified Files: sonar.c sonar.h Log Message: Added support function for parsing results in a general way Index: sonar.c =================================================================== RCS file: /cvsroot/autosec/sonar/src/sonar.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** sonar.c 1 Oct 2003 08:18:41 -0000 1.21 --- sonar.c 14 Oct 2003 23:43:57 -0000 1.22 *************** *** 94,97 **** --- 94,98 ---- mthis->ipverify = &sonar_isip; mthis->output = &sonar_rawoutput; + mthis->results = &sonar_result_hook; mthis->usage = &sonar_usage; mthis->getprivs = &sonar_getprivs; *************** *** 592,594 **** --- 593,621 ---- } return status; + } + + int sonar_result_hook(result_t *results, int num_records) + { + int i, j = 0, ret = SONAR_OK; + assert(results != NULL); + + /* go through the number of records */ + while(j < num_records && results != NULL) + { + /* go through the output plugins and send it to the selected ones */ + for(i=0; i < num_out; i++) + { + if(output_list[i].plug->selected && output_list[i].plug->ready) + { + /* let each plugin parse its own results */ + ret = output_list[i].plug->plugin_results(results); + if(ret != SONAR_OK) + log_write(LOG_CONSOLE | LOG_SLOG, "output plugin \'%s\' had trouble writing output\n", output_list[i].plug->shortname); + } + } + j++; + results = results->next; + } + + return ret; } Index: sonar.h =================================================================== RCS file: /cvsroot/autosec/sonar/src/sonar.h,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** sonar.h 1 Oct 2003 07:24:04 -0000 1.23 --- sonar.h 14 Oct 2003 23:43:57 -0000 1.24 *************** *** 77,80 **** --- 77,81 ---- void sonar_status_report(sonar_t mthis); int sonar_rawoutput(char *msg, ...); + int sonar_result_hook(result_t *results, int num_records); int sonar_sweep(target_t *targets); void default_context(void *in); |
From: <re...@us...> - 2003-10-14 23:43:25
|
Update of /cvsroot/autosec/sonar/plugins In directory sc8-pr-cvs1:/tmp/cvs-serv29571/plugins Modified Files: log_file.c log_file.h Log Message: Interim work on updating output plugins Index: log_file.c =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/log_file.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** log_file.c 28 Apr 2003 23:03:15 -0000 1.8 --- log_file.c 14 Oct 2003 23:43:21 -0000 1.9 *************** *** 67,70 **** --- 67,71 ---- pthis.plugin_sweep = NULL; pthis.plugin_output = &plugin_output; + pthis.plugin_results = &plugin_results; pthis.plugin_usage = &plugin_usage; pthis.plugin_status = &plugin_status; *************** *** 95,98 **** --- 96,100 ---- pthis.plugin_sweep = NULL; pthis.plugin_output = NULL; + pthis.plugin_results = NULL; pthis.plugin_usage = NULL; pthis.plugin_status = NULL; *************** *** 181,184 **** --- 183,214 ---- vfprintf(my_fp, msg, *ap); return PLUGIN_OK; + } + + static int plugin_results(result_t *result) + { + struct sockaddr_in *sa; + assert(result != NULL); + int i; + + sa = (struct sockaddr_in *) result->ainfo->ai_addr; + fprintf(my_fp, "Host %s[%s] results:\n", result->hostname, inet_ntoa(sa->sin_addr)); + /* print the port info */ + for(i =0; i < 65536; i++) + { + switch(result->ports[i]) + { + case PORT_OPENED: + fprintf(my_fp, " port %d state: open\n", i); + break; + case PORT_CLOSED: + fprintf(my_fp, " port %d state: closed\n", i); + break; + case PORT_FILTERED: + fprintf(my_fp, " port %d state: filtered\n", i); + break; + } + } + + return PLUGIN_OK; } Index: log_file.h =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/log_file.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** log_file.h 28 Apr 2003 23:03:41 -0000 1.3 --- log_file.h 14 Oct 2003 23:43:21 -0000 1.4 *************** *** 30,33 **** --- 30,37 ---- #include <sys/time.h> #include <stdarg.h> + #include <sys/socket.h> + #include <netinet/in.h> + #include <arpa/inet.h> + #include <netdb.h> #include "error.h" *************** *** 54,57 **** --- 58,62 ---- static int plugin_close(void); static int plugin_output(char *msg, va_list * ap); + static int plugin_results(result_t *result); static void plugin_usage(void); static void plugin_status(void); |
From: <re...@us...> - 2003-10-14 23:42:30
|
Update of /cvsroot/autosec/sonar/src In directory sc8-pr-cvs1:/tmp/cvs-serv29357/src Modified Files: plugin.h Log Message: Added result structure for general output parsing Index: plugin.h =================================================================== RCS file: /cvsroot/autosec/sonar/src/plugin.h,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** plugin.h 1 Oct 2003 08:18:41 -0000 1.26 --- plugin.h 14 Oct 2003 23:42:26 -0000 1.27 *************** *** 96,99 **** --- 96,107 ---- + #define PORT_DONTSCAN 0 + #define PORT_SCAN 1 + #define PORT_SCANNING 2 + #define PORT_SCANNED 3 + #define PORT_OPENED 4 + #define PORT_CLOSED 5 + #define PORT_FILTERED 6 + typedef struct target_s target_t; *************** *** 119,122 **** --- 127,146 ---- }; + typedef struct result_s result_t; + + struct result_s + { + /// next result for plugins that return all results at once + result_t *next; + /// hostname + char *hostname; + /// ports state structure + unsigned char ports[65537]; + /// address information + struct addrinfo *ainfo; + /// extra data? + void *user_data; + }; + /** \struct pluginContext * Contains useful plugin data *************** *** 194,199 **** int (*plugin_sweep) (target_t *targets); ! /// Output plugin's output function int (*plugin_output) (char *msg, va_list * ap); /// prints, via sonar_t->output(), line(s) to add to sonar_usage() --- 218,225 ---- int (*plugin_sweep) (target_t *targets); ! /// Output plugin's general message output function int (*plugin_output) (char *msg, va_list * ap); + /// output plugins result output function + int (*plugin_results) (result_t *result); /// prints, via sonar_t->output(), line(s) to add to sonar_usage() *************** *** 259,262 **** --- 285,290 ---- /// Pointer to sonar's output to console function (no timestamp) int (*output) (char *msg, ...); + /// point to sonar's result collecting function + int (*results) (result_t *results, int num_records); /// Pointer to usage function, for error reports |
From: <re...@us...> - 2003-10-14 23:42:02
|
Update of /cvsroot/autosec/sonar/src In directory sc8-pr-cvs1:/tmp/cvs-serv29258/src Modified Files: plugin.c Log Message: Updated to libtools library loading Index: plugin.c =================================================================== RCS file: /cvsroot/autosec/sonar/src/plugin.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** plugin.c 1 Oct 2003 07:17:44 -0000 1.20 --- plugin.c 14 Oct 2003 23:41:57 -0000 1.21 *************** *** 40,44 **** #endif ! #include <dlfcn.h> #ifdef HAVE_STDLIB_H --- 40,46 ---- #endif ! ! #include <ltdl.h> ! #ifdef HAVE_STDLIB_H *************** *** 190,194 **** // directory to search defined as PLUGINDIR DIR *dir; ! void *plugin; void *(*plugin_init) (void *); struct stat *my_buf; --- 192,196 ---- // directory to search defined as PLUGINDIR DIR *dir; ! lt_dlhandle *plugin; void *(*plugin_init) (void *); struct stat *my_buf; *************** *** 246,264 **** // XXX: unlock /* end check */ ! log_write(LOG_DBUG, " dlopen(%s, RTLD_LAZY); => ", str); ! if((plugin = dlopen(str, RTLD_LAZY)) == NULL) { char *dl_error_msg = ! (char *) dlerror(); log_write(LOG_DBUG, " FAILED!\n"); ! log_write(LOG_CONSOLE | LOG_SLOG, "could not load %s:\n%s", str, dl_error_msg); continue; } log_write(LOG_DBUG, " %p (ok)\n", plugin); ! log_write(LOG_DBUG, " dlsym(%p, \"plugin_init\"); => ", plugin); plugin_init = ! (void *(*)(void *)) dlsym(plugin, "plugin_init"); if(plugin_init != NULL) --- 248,267 ---- // XXX: unlock /* end check */ ! lt_dlinit(); ! log_write(LOG_DBUG, " lt_dlopen(%s); => ", str); ! if((plugin = lt_dlopen(str)) == NULL) { char *dl_error_msg = ! (char *) lt_dlerror(); log_write(LOG_DBUG, " FAILED!\n"); ! log_write(LOG_CONSOLE | LOG_SLOG, "could not load %s: %s\n", str, dl_error_msg); continue; } log_write(LOG_DBUG, " %p (ok)\n", plugin); ! log_write(LOG_DBUG, " lt_dlsym(%p, \"plugin_init\"); => ", plugin); plugin_init = ! (void *(*)(void *)) lt_dlsym(plugin, "plugin_init"); if(plugin_init != NULL) *************** *** 286,290 **** { char *dl_error_msg = ! (char *) dlerror(); log_write(LOG_DBUG, " FAILED!\n"); log_write(LOG_CONSOLE | LOG_SLOG, " could not load plugin_init in %s:\n%s\n", str, dl_error_msg); --- 289,293 ---- { char *dl_error_msg = ! (char *) lt_dlerror(); log_write(LOG_DBUG, " FAILED!\n"); log_write(LOG_CONSOLE | LOG_SLOG, " could not load plugin_init in %s:\n%s\n", str, dl_error_msg); *************** *** 336,340 **** } input_list[num_inp - 1].plug = NULL; ! dlclose(input_list[num_inp - 1].handle); } } --- 339,343 ---- } input_list[num_inp - 1].plug = NULL; ! lt_dlclose(input_list[num_inp - 1].handle); } } *************** *** 361,365 **** } output_list[num_out - 1].plug = NULL; ! dlclose(output_list[num_out - 1].handle); } } --- 364,368 ---- } output_list[num_out - 1].plug = NULL; ! lt_dlclose(output_list[num_out - 1].handle); } } *************** *** 382,387 **** } network_list[num_net - 1].plug = NULL; ! dlclose(network_list[num_net - 1].handle); } return err; } --- 385,391 ---- } network_list[num_net - 1].plug = NULL; ! lt_dlclose(network_list[num_net - 1].handle); } + lt_dlexit(); return err; } *************** *** 393,397 **** * @param p_data Pointer to filled plugin_t structure * @param mthis Pointer to a filled sonar_t structure ! * @param hptr Handle returned by dlopen(3) * @return PLUGIN_OK if ok, PLUGIN_ERROR otherwise */ --- 397,401 ---- * @param p_data Pointer to filled plugin_t structure * @param mthis Pointer to a filled sonar_t structure ! * @param hptr Handle returned by lt_dlopen(3) * @return PLUGIN_OK if ok, PLUGIN_ERROR otherwise */ |
From: <re...@us...> - 2003-10-14 23:40:30
|
Update of /cvsroot/autosec/sonar/src In directory sc8-pr-cvs1:/tmp/cvs-serv28938/src Modified Files: Makefile.am Makefile.in Log Message: Makefile updates Index: Makefile.am =================================================================== RCS file: /cvsroot/autosec/sonar/src/Makefile.am,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Makefile.am 1 Oct 2003 07:14:02 -0000 1.13 --- Makefile.am 14 Oct 2003 23:40:25 -0000 1.14 *************** *** 1,9 **** include_HEADERS = sonar.h plugin.h error.h noinst_HEADERS = util.h types.h popts.h bin_PROGRAMS = sonar sonar_SOURCES = sonar.c sonar.h util.c util.h plugin.c plugin.h popts.c popts.h error.c error.h mutex.c mutex.h net.c net.h target.c target.h service.c service.h log.c log.h ! sonar_LDADD = $(DYNAMIC_LD_LIBS) plugindir = $(prefix)/lib/sonar --- 1,11 ---- + INCLUDES += @INCLTDL@ + include_HEADERS = sonar.h plugin.h error.h noinst_HEADERS = util.h types.h popts.h bin_PROGRAMS = sonar sonar_SOURCES = sonar.c sonar.h util.c util.h plugin.c plugin.h popts.c popts.h error.c error.h mutex.c mutex.h net.c net.h target.c target.h service.c service.h log.c log.h ! sonar_LDADD = $(DYNAMIC_LD_LIBS) @LIBLTDL@ plugindir = $(prefix)/lib/sonar Index: Makefile.in =================================================================== RCS file: /cvsroot/autosec/sonar/src/Makefile.in,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** Makefile.in 1 Oct 2003 07:14:02 -0000 1.26 --- Makefile.in 14 Oct 2003 23:40:25 -0000 1.27 *************** *** 80,84 **** --- 80,86 ---- DYNAMIC_LD_LIBS = @DYNAMIC_LD_LIBS@ ECHO = @ECHO@ + INCLTDL = @INCLTDL@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LIBLTDL = @LIBLTDL@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ *************** *** 89,107 **** STRIP = @STRIP@ VERSION = @VERSION@ - ac_aux_dir = @ac_aux_dir@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ include_HEADERS = sonar.h plugin.h error.h noinst_HEADERS = util.h types.h popts.h bin_PROGRAMS = sonar sonar_SOURCES = sonar.c sonar.h util.c util.h plugin.c plugin.h popts.c popts.h error.c error.h mutex.c mutex.h net.c net.h target.c target.h service.c service.h log.c log.h ! sonar_LDADD = $(DYNAMIC_LD_LIBS) plugindir = $(prefix)/lib/sonar CFLAGS = @CFLAGS@ -DPLUGINDIR="\"$(libdir)\"" subdir = src ! mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = --- 91,110 ---- STRIP = @STRIP@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ + INCLUDES = @INCLTDL@ + include_HEADERS = sonar.h plugin.h error.h noinst_HEADERS = util.h types.h popts.h bin_PROGRAMS = sonar sonar_SOURCES = sonar.c sonar.h util.c util.h plugin.c plugin.h popts.c popts.h error.c error.h mutex.c mutex.h net.c net.h target.c target.h service.c service.h log.c log.h ! sonar_LDADD = $(DYNAMIC_LD_LIBS) @LIBLTDL@ plugindir = $(prefix)/lib/sonar CFLAGS = @CFLAGS@ -DPLUGINDIR="\"$(libdir)\"" subdir = src ! mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = *************** *** 121,125 **** LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ ! depcomp = $(SHELL) $(top_srcdir)/admin/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/error.Po ./$(DEPDIR)/log.Po \ --- 124,128 ---- LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ ! depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/error.Po ./$(DEPDIR)/log.Po \ |
From: <re...@us...> - 2003-10-14 23:40:29
|
Update of /cvsroot/autosec/sonar/plugins In directory sc8-pr-cvs1:/tmp/cvs-serv28938/plugins Modified Files: Makefile.in Log Message: Makefile updates Index: Makefile.in =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/Makefile.in,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** Makefile.in 1 Oct 2003 07:07:11 -0000 1.29 --- Makefile.in 14 Oct 2003 23:40:24 -0000 1.30 *************** *** 80,84 **** --- 80,86 ---- DYNAMIC_LD_LIBS = @DYNAMIC_LD_LIBS@ ECHO = @ECHO@ + INCLTDL = @INCLTDL@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LIBLTDL = @LIBLTDL@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ *************** *** 89,93 **** STRIP = @STRIP@ VERSION = @VERSION@ - ac_aux_dir = @ac_aux_dir@ am__include = @am__include@ am__quote = @am__quote@ --- 91,94 ---- *************** *** 111,115 **** libsonar_out_log_la_LIBADD = @LTLIBOBJS@ subdir = plugins ! mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = --- 112,116 ---- libsonar_out_log_la_LIBADD = @LTLIBOBJS@ subdir = plugins ! mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = *************** *** 137,141 **** LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ ! depcomp = $(SHELL) $(top_srcdir)/admin/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = $(DEPDIR)/error.Plo ./$(DEPDIR)/inp_rand.Plo \ --- 138,142 ---- LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ ! depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = $(DEPDIR)/error.Plo ./$(DEPDIR)/inp_rand.Plo \ |
From: <re...@us...> - 2003-10-14 23:40:29
|
Update of /cvsroot/autosec/sonar/doc In directory sc8-pr-cvs1:/tmp/cvs-serv28938/doc Modified Files: Makefile.in Log Message: Makefile updates Index: Makefile.in =================================================================== RCS file: /cvsroot/autosec/sonar/doc/Makefile.in,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Makefile.in 24 Sep 2003 19:57:16 -0000 1.11 --- Makefile.in 14 Oct 2003 23:40:23 -0000 1.12 *************** *** 80,84 **** --- 80,86 ---- DYNAMIC_LD_LIBS = @DYNAMIC_LD_LIBS@ ECHO = @ECHO@ + INCLTDL = @INCLTDL@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LIBLTDL = @LIBLTDL@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ *************** *** 89,93 **** STRIP = @STRIP@ VERSION = @VERSION@ - ac_aux_dir = @ac_aux_dir@ am__include = @am__include@ am__quote = @am__quote@ --- 91,94 ---- *************** *** 96,100 **** DOCSUBDIRS = html subdir = doc ! mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = docConf --- 97,101 ---- DOCSUBDIRS = html subdir = doc ! mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = docConf |
From: <re...@us...> - 2003-10-14 23:40:27
|
Update of /cvsroot/autosec/sonar In directory sc8-pr-cvs1:/tmp/cvs-serv28938 Modified Files: Makefile.in Makefile.am Log Message: Makefile updates Index: Makefile.in =================================================================== RCS file: /cvsroot/autosec/sonar/Makefile.in,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Makefile.in 24 Sep 2003 21:17:33 -0000 1.27 --- Makefile.in 14 Oct 2003 23:40:23 -0000 1.28 *************** *** 80,84 **** --- 80,86 ---- DYNAMIC_LD_LIBS = @DYNAMIC_LD_LIBS@ ECHO = @ECHO@ + INCLTDL = @INCLTDL@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LIBLTDL = @LIBLTDL@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ *************** *** 89,93 **** STRIP = @STRIP@ VERSION = @VERSION@ - ac_aux_dir = @ac_aux_dir@ am__include = @am__include@ am__quote = @am__quote@ --- 91,94 ---- *************** *** 96,100 **** AUTOMAKE_OPTIONS = 1.6 ! SUBDIRS = src plugins doc AUX_DIST = $(ac_aux_dir)/config.guess \ --- 97,101 ---- AUTOMAKE_OPTIONS = 1.6 ! SUBDIRS = libltdl src plugins doc AUX_DIST = $(ac_aux_dir)/config.guess \ *************** *** 131,135 **** subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ! mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = --- 132,136 ---- subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ! mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = *************** *** 146,152 **** DIST_COMMON = README $(noinst_HEADERS) AUTHORS COPYING ChangeLog \ INSTALL Makefile.am Makefile.in NEWS TODO aclocal.m4 \ ! admin/config.guess admin/config.sub admin/depcomp \ ! admin/install-sh admin/ltmain.sh admin/missing \ ! admin/mkinstalldirs config.h.in configure configure.in DIST_SUBDIRS = $(SUBDIRS) all: config.h --- 147,152 ---- DIST_COMMON = README $(noinst_HEADERS) AUTHORS COPYING ChangeLog \ INSTALL Makefile.am Makefile.in NEWS TODO aclocal.m4 \ ! config.guess config.h.in config.sub configure configure.in \ ! depcomp install-sh ltmain.sh missing mkinstalldirs DIST_SUBDIRS = $(SUBDIRS) all: config.h *************** *** 327,331 **** $(am__remove_distdir) mkdir $(distdir) ! $(mkinstalldirs) $(distdir)/admin $(distdir)/doc @list='$(DISTFILES)'; for file in $$list; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ --- 327,331 ---- $(am__remove_distdir) mkdir $(distdir) ! $(mkinstalldirs) $(distdir)/doc @list='$(DISTFILES)'; for file in $$list; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ Index: Makefile.am =================================================================== RCS file: /cvsroot/autosec/sonar/Makefile.am,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Makefile.am 24 Sep 2003 21:17:33 -0000 1.12 --- Makefile.am 14 Oct 2003 23:40:23 -0000 1.13 *************** *** 5,9 **** AUTOMAKE_OPTIONS = 1.6 ! SUBDIRS = src plugins doc AUX_DIST = $(ac_aux_dir)/config.guess \ --- 5,9 ---- AUTOMAKE_OPTIONS = 1.6 ! SUBDIRS = libltdl src plugins doc AUX_DIST = $(ac_aux_dir)/config.guess \ |
Update of /cvsroot/autosec/sonar In directory sc8-pr-cvs1:/tmp/cvs-serv28457 Modified Files: bootstrap config.h.in configure configure.in Added Files: config.guess config.sub depcomp install-sh ltmain.sh missing mkinstalldirs Log Message: Updated the bootstrap and configuring mechs --- NEW FILE: config.guess --- #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002 Free Software Foundation, Inc. timestamp='2002-10-21' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software [...1324 lines suppressed...] /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: --- NEW FILE: config.sub --- #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002 Free Software Foundation, Inc. timestamp='2002-09-05' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the [...1431 lines suppressed...] -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: --- NEW FILE: depcomp --- #! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva <ol...@dc...>. if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # `libtool' can also be set to `yes' or `no'. if test -z "$depfile"; then base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` dir=`echo "$object" | sed 's,/.*$,/,'` if test "$dir" = "$object"; then dir= fi # FIXME: should be _deps on DOS. depfile="$dir.deps/$base" fi tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. This file always lives in the current directory. # Also, the AIX compiler puts `$object:' at the start of each line; # $object doesn't have directory information. stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" outname="$stripped.o" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a space and a tab in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. We will use -o /dev/null later, # however we can't do the remplacement now because # `-o $object' might simply not be used IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; -*) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 --- NEW FILE: ltmain.sh --- # ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit <go...@gn...>, 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software [...5085 lines suppressed...] If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit 1 ;; esac echo $echo "Try \`$modename --help' for more information about other modes." exit 0 # Local Variables: # mode:shell-script # sh-indentation:2 # End: --- NEW FILE: missing --- #! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pi...@ir...>, 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.4 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. You can get \`$1Help2man' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequirements for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 --- NEW FILE: mkinstalldirs --- #! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman <fri...@pr...> # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case "${1}" in -h | --help | --h* ) # -h for help echo "${usage}" 1>&2; exit 0 ;; -m ) # -m PERM arg shift test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } dirmode="${1}" shift ;; -- ) shift; break ;; # stop option processing -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option * ) break ;; # first non-opt arg esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 3 # End: # mkinstalldirs ends here Index: bootstrap =================================================================== RCS file: /cvsroot/autosec/sonar/bootstrap,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** bootstrap 24 Sep 2003 19:57:15 -0000 1.1 --- bootstrap 14 Oct 2003 23:38:59 -0000 1.2 *************** *** 52,60 **** set -x ! aclocal -I admin ! libtoolize --force --copy autoheader automake --add-missing --copy $* autoconf ! rm -f config.cache --- 52,60 ---- set -x ! aclocal ! libtoolize --force --copy --ltdl autoheader automake --add-missing --copy $* autoconf ! cd libltdl && autoconf && cd .. rm -f config.cache Index: config.h.in =================================================================== RCS file: /cvsroot/autosec/sonar/config.h.in,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** config.h.in 24 Sep 2003 19:57:15 -0000 1.18 --- config.h.in 14 Oct 2003 23:38:59 -0000 1.19 *************** *** 14,20 **** #undef HAVE_DLFCN_H - /* Define to 1 if you have the `dlopen' function. */ - #undef HAVE_DLOPEN - /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT --- 14,17 ---- *************** *** 52,55 **** --- 49,55 ---- /* Define to 1 if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD + + /* Define to 1 if you have the `lt_dlopen' function. */ + #undef HAVE_LT_DLOPEN /* Define to 1 if your system has a GNU libc compatible `malloc' function, and Index: configure =================================================================== RCS file: /cvsroot/autosec/sonar/configure,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** configure 28 Sep 2003 10:00:10 -0000 1.28 --- configure 14 Oct 2003 23:38:59 -0000 1.29 *************** *** 433,436 **** --- 433,437 ---- ac_unique_file="src/sonar.c" + ac_subdirs_all="$ac_subdirs_all libltdl" ac_default_prefix=/usr/local # Factoring default headers for most tests. *************** *** 471,475 **** #endif" ! ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE LN_S ECHO RANLIB ac_ct_RANLIB CPP EGREP LIBTOOL DOXYGEN LIBOBJS DYNAMIC_LD_LIBS DEBUG_CFLAGS ac_aux_dir LTLIBOBJS' ac_subst_files='' --- 472,476 ---- #endif" ! ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS subdirs build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE LN_S ECHO RANLIB ac_ct_RANLIB CPP EGREP LIBTOOL DOXYGEN LIBOBJS DYNAMIC_LD_LIBS DEBUG_CFLAGS INCLTDL LIBLTDL LTLIBOBJS' ac_subst_files='' *************** *** 1457,1462 **** ac_aux_dir= ! for ac_dir in admin $srcdir/admin; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir --- 1458,1464 ---- + #AC_CONFIG_AUX_DIR([admin]) ac_aux_dir= ! for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir *************** *** 1474,1479 **** done if test -z "$ac_aux_dir"; then ! { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in admin $srcdir/admin" >&5 ! echo "$as_me: error: cannot find install-sh or install.sh in admin $srcdir/admin" >&2;} { (exit 1); exit 1; }; } fi --- 1476,1481 ---- done if test -z "$ac_aux_dir"; then ! { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 ! echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi *************** *** 1482,1485 **** --- 1484,1491 ---- ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + + + subdirs="$subdirs libltdl" + # Add the stamp file to the list of files AC keeps track of, # along with our hook. *************** *** 3137,3140 **** --- 3143,3158 ---- + case $enable_ltdl_convenience in + no) { { echo "$as_me:$LINENO: error: this package needs a convenience libltdl" >&5 + echo "$as_me: error: this package needs a convenience libltdl" >&2;} + { (exit 1); exit 1; }; } ;; + "") enable_ltdl_convenience=yes + ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; + esac + LIBLTDL='${top_builddir}/''libltdl'/libltdlc.la + LTDLINCL='-I${top_srcdir}/''libltdl' + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" + # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then *************** *** 4765,4769 **** *-*-irix6*) # Find out which ABI we are using. ! echo '#line 4767 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 --- 4783,4787 ---- *-*-irix6*) # Find out which ABI we are using. ! echo '#line 4785 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 *************** *** 5312,5316 **** CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no ! if { (eval echo configure:5314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings --- 5330,5334 ---- CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no ! if { (eval echo configure:5332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings *************** *** 6503,6507 **** case "$host_cpu" in x86_64*) ! echo '#line 6505 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 --- 6521,6525 ---- case "$host_cpu" in x86_64*) ! echo '#line 6523 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 *************** *** 7175,7179 **** lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF ! #line 7177 "configure" #include "confdefs.h" --- 7193,7197 ---- lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF ! #line 7195 "configure" #include "confdefs.h" *************** *** 7273,7277 **** lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF ! #line 7275 "configure" #include "confdefs.h" --- 7291,7295 ---- lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF ! #line 7293 "configure" #include "confdefs.h" *************** *** 8046,8052 **** fi # Checks for libraries. ! for ac_func in dlopen do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` --- 8064,8071 ---- fi + # Checks for libraries. ! for ac_func in lt_dlopen do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` *************** *** 8129,8196 **** else ! echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 ! echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 ! if test "${ac_cv_lib_dl_dlopen+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! ac_check_lib_save_LIBS=$LIBS ! LIBS="-ldl $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char dlopen (); ! int ! main () ! { ! dlopen (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_lib_dl_dlopen=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_lib_dl_dlopen=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! LIBS=$ac_check_lib_save_LIBS ! fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 ! echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 ! if test $ac_cv_lib_dl_dlopen = yes; then ! DYNAMIC_LD_LIBS="-ldl" ! else ! echo "$as_me:$LINENO: checking for dlopen in -lcc_dynamic" >&5 ! echo $ECHO_N "checking for dlopen in -lcc_dynamic... $ECHO_C" >&6 ! if test "${ac_cv_lib_cc_dynamic_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS ! LIBS="-lcc_dynamic $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" --- 8148,8158 ---- else ! echo "$as_me:$LINENO: checking for dlopen in -lltdl" >&5 ! echo $ECHO_N "checking for dlopen in -lltdl... $ECHO_C" >&6 ! if test "${ac_cv_lib_ltdl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS ! LIBS="-lltdl $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" *************** *** 8228,8251 **** echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_lib_cc_dynamic_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_lib_cc_dynamic_dlopen=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_cc_dynamic_dlopen" >&5 ! echo "${ECHO_T}$ac_cv_lib_cc_dynamic_dlopen" >&6 ! if test $ac_cv_lib_cc_dynamic_dlopen = yes; then ! DYNAMIC_LD_LIBS="-lcc_dynamic" else ! { { echo "$as_me:$LINENO: error: dlopen not found: If you are on linux" >&5 ! echo "$as_me: error: dlopen not found: If you are on linux" >&2;} ! { (exit you should have libdl installed. If you are on Mac OS X); exit you should have libdl installed. If you are on Mac OS X; }; } ! fi ! fi --- 8190,8211 ---- echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_lib_ltdl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_lib_ltdl_dlopen=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_dlopen" >&5 ! echo "${ECHO_T}$ac_cv_lib_ltdl_dlopen" >&6 ! if test $ac_cv_lib_ltdl_dlopen = yes; then ! DYNAMIC_LD_LIBS="-lltdl" else ! { { echo "$as_me:$LINENO: error: lt_dlopen not found: You should have libtool dlopen installed." >&5 ! echo "$as_me: error: lt_dlopen not found: You should have libtool dlopen installed." >&2;} ! { (exit 1); exit 1; }; } fi *************** *** 11600,11603 **** --- 11560,11564 ---- + ac_config_files="$ac_config_files Makefile doc/Makefile plugins/Makefile src/Makefile doc/docConf" *************** *** 12242,12245 **** --- 12203,12207 ---- s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t + s,@subdirs@,$subdirs,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t *************** *** 12299,12303 **** s,@DYNAMIC_LD_LIBS@,$DYNAMIC_LD_LIBS,;t t s,@DEBUG_CFLAGS@,$DEBUG_CFLAGS,;t t ! s,@ac_aux_dir@,$ac_aux_dir,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF --- 12261,12266 ---- s,@DYNAMIC_LD_LIBS@,$DYNAMIC_LD_LIBS,;t t s,@DEBUG_CFLAGS@,$DEBUG_CFLAGS,;t t ! s,@INCLTDL@,$INCLTDL,;t t ! s,@LIBLTDL@,$LIBLTDL,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF *************** *** 12912,12915 **** --- 12875,13022 ---- # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } + fi + + # + # CONFIG_SUBDIRS section. + # + if test "$no_recursion" != yes; then + + # Remove --cache-file and --srcdir arguments so they do not pile up. + ac_sub_configure_args= + ac_prev= + for ac_arg in $ac_configure_args; do + if test -n "$ac_prev"; then + ac_prev= + continue + fi + case $ac_arg in + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ + | --c=*) + ;; + --config-cache | -C) + ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + ;; + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + ;; + *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; + esac + done + + # Always prepend --prefix to ensure using the same prefix + # in subdir configurations. + ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args" + + ac_popdir=`pwd` + for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue + + # Do not complain, so a configure script can configure whichever + # parts of a large source tree are present. + test -d $srcdir/$ac_dir || continue + + { echo "$as_me:$LINENO: configuring in $ac_dir" >&5 + echo "$as_me: configuring in $ac_dir" >&6;} + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || + $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || + echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 + echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + + if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` + else + ac_dir_suffix= ac_top_builddir= + fi + + case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; + esac + # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be + # absolute. + ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` + ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` + ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` + ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + + cd $ac_dir + + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + ac_sub_configure="$SHELL '$ac_srcdir/configure.gnu'" + elif test -f $ac_srcdir/configure; then + ac_sub_configure="$SHELL '$ac_srcdir/configure'" + elif test -f $ac_srcdir/configure.in; then + ac_sub_configure=$ac_configure + else + { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5 + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} + ac_sub_configure= + fi + + # The recursion is here. + if test -n "$ac_sub_configure"; then + # Make the cache file name correct relative to the subdirectory. + case $cache_file in + [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; + *) # Relative path. + ac_sub_cache_file=$ac_top_builddir$cache_file ;; + esac + + { echo "$as_me:$LINENO: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 + echo "$as_me: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} + # The eval makes quoting arguments work. + eval $ac_sub_configure $ac_sub_configure_args \ + --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir || + { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5 + echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;} + { (exit 1); exit 1; }; } + fi + + cd $ac_popdir + done fi Index: configure.in =================================================================== RCS file: /cvsroot/autosec/sonar/configure.in,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** configure.in 28 Sep 2003 10:00:14 -0000 1.25 --- configure.in 14 Oct 2003 23:38:59 -0000 1.26 *************** *** 4,8 **** AC_CONFIG_SRCDIR([src/sonar.c]) ! AC_CONFIG_AUX_DIR([admin]) AM_CONFIG_HEADER([config.h]) AC_CANONICAL_SYSTEM --- 4,9 ---- AC_CONFIG_SRCDIR([src/sonar.c]) ! #AC_CONFIG_AUX_DIR([admin]) ! AC_CONFIG_SUBDIRS(libltdl) AM_CONFIG_HEADER([config.h]) AC_CANONICAL_SYSTEM *************** *** 24,27 **** --- 25,29 ---- AC_LIBTOOL_DLOPEN + AC_LIBLTDL_CONVENIENCE AC_PROG_LIBTOOL *************** *** 36,46 **** fi # Checks for libraries. ! AC_CHECK_FUNCS(dlopen,, ! [AC_CHECK_LIB(dl,dlopen, ! DYNAMIC_LD_LIBS="-ldl", ! [AC_CHECK_LIB(cc_dynamic,dlopen, ! DYNAMIC_LD_LIBS="-lcc_dynamic", ! AC_MSG_ERROR(dlopen not found: If you are on linux, you should have libdl installed. If you are on Mac OS X, install the latest version of Fink from here: http://fink.sourceforge.net . After that, replace Apple's version of Bash with the one from Fink, that should give you libdl))])]) AC_CHECK_LIB([pthread], [pthread_create], , [echo "You need pthreads or GNU Pth installed to use this program. Get GNU Pth at http://www.gnu.org/software/pth"; exit]) --- 38,47 ---- fi + # Checks for libraries. ! AC_CHECK_FUNCS(lt_dlopen,, ! [AC_CHECK_LIB(ltdl,dlopen, ! DYNAMIC_LD_LIBS="-lltdl", ! AC_MSG_ERROR(lt_dlopen not found: You should have libtool dlopen installed.))]) AC_CHECK_LIB([pthread], [pthread_create], , [echo "You need pthreads or GNU Pth installed to use this program. Get GNU Pth at http://www.gnu.org/software/pth"; exit]) *************** *** 112,116 **** PLUGFLAGS="$dyn $pic" ! AC_SUBST(ac_aux_dir) AC_CONFIG_FILES([Makefile --- 113,118 ---- PLUGFLAGS="$dyn $pic" ! AC_SUBST(INCLTDL) ! AC_SUBST(LIBLTDL) AC_CONFIG_FILES([Makefile |