Changeset 20 for trunk/src/sh_readconf.c


Ignore:
Timestamp:
Feb 13, 2006, 11:54:42 PM (19 years ago)
Author:
rainer
Message:

Enable command-line parsing for prelude, and make prelude regression test safer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_readconf.c

    r1 r20  
    731731#endif
    732732
     733/* Yes, this isn't very elegant ;)
     734 */
     735#if defined(WITH_EXTERNAL)
     736int sh_error_set_external_wrap (char * str) {
     737  return sh_error_set_external ((const char *) str);
     738}
     739#endif
     740#if defined (SH_WITH_CLIENT) || defined (SH_STANDALONE)
     741int sh_files_setrecursion_wrap (char * str) {
     742  return sh_files_setrecursion ((const char *) str);
     743}
     744int sh_util_setchecksum_wrap (char * str) {
     745  return sh_util_setchecksum ((const char *) str);
     746}
     747#endif
     748int sh_util_setlooptime_wrap (char * str) {
     749  return sh_util_setlooptime ((const char *) str);
     750}
     751#ifdef SH_WITH_MAIL
     752int sh_error_setseverity_wrap (char * str) {
     753  return sh_error_setseverity ((const char *) str);
     754}
     755#endif
     756int sh_calls_set_bind_addr_wrap (char * str) {
     757  return sh_calls_set_bind_addr ((const char *) str);
     758}
     759int sh_unix_setdeamon_wrap (char * str) {
     760  return sh_unix_setdeamon ((const char *) str);
     761}
     762int sh_error_setprint_wrap (char * str) {
     763  return sh_error_setprint ((const char *) str);
     764}
     765int sh_error_setlog_wrap (char * str) {
     766  return sh_error_setlog ((const char *) str);
     767}
     768int sh_error_set_syslog_wrap (char * str) {
     769  return sh_error_set_syslog ((const char *) str);
     770}
     771#ifdef HAVE_LIBPRELUDE
     772int sh_error_set_prelude_wrap (char * str) {
     773  return sh_error_set_prelude ((const char *) str);
     774}
     775#endif
     776#ifdef SH_WITH_CLIENT
     777int sh_error_setexport_wrap (char * str) {
     778  return sh_error_setexport ((const char *) str);
     779}
     780#endif
     781#ifdef SH_WITH_SERVER
     782int sh_forward_set_strip_wrap (char * str) {
     783  return sh_forward_set_strip ((const char *) str);
     784}
     785int sh_unix_set_chroot_wrap (char * str) {
     786  return sh_unix_set_chroot ((const char *) str);
     787}
     788#endif
     789#if defined(WITH_DATABASE)
     790int sh_error_set_database_wrap (char * str) {
     791  return sh_error_set_database ((const char *) str);
     792}
     793#endif
     794 
    733795cfg_options ext_table[] = {
    734796#if defined(WITH_EXTERNAL)
     
    756818    sh_ext_add_or },
    757819  { N_("externalseverity"),SH_SECTION_LOG,      SH_SECTION_EXTERNAL, 
    758     sh_error_set_external },
     820    sh_error_set_external_wrap },
    759821  { N_("externalclass"),   SH_SECTION_LOG,      SH_SECTION_EXTERNAL, 
    760822    sh_error_external_mask },
     
    840902    sh_util_obscure_ok },
    841903  { N_("setrecursionlevel"),  SH_SECTION_MISC,   SH_SECTION_NONE,
    842     sh_files_setrecursion },
     904    sh_files_setrecursion_wrap },
    843905  { N_("checksumtest"),       SH_SECTION_MISC,   SH_SECTION_NONE,
    844     sh_util_setchecksum },
     906    sh_util_setchecksum_wrap },
    845907  { N_("reportonlyonce"),     SH_SECTION_MISC,   SH_SECTION_NONE,
    846908    sh_files_reportonce },
     
    915977    sh_socket_password },
    916978  { N_("setstripdomain"),      SH_SECTION_SRV,  SH_SECTION_MISC,
    917     sh_forward_set_strip },
     979    sh_forward_set_strip_wrap },
    918980  { N_("useseparatelogs"),     SH_SECTION_SRV,  SH_SECTION_MISC,
    919981    set_flag_sep_log },
    920982  { N_("setchrootdir"),        SH_SECTION_SRV,  SH_SECTION_MISC,
    921     sh_unix_set_chroot },
     983    sh_unix_set_chroot_wrap },
    922984  { N_("setclienttimelimit"),  SH_SECTION_SRV,  SH_SECTION_MISC,
    923985    sh_forward_set_time_limit },
     
    9401002#ifdef SH_WITH_CLIENT
    9411003  { N_("exportseverity"),      SH_SECTION_LOG,  SH_SECTION_NONE,
    942     sh_error_setexport },
     1004    sh_error_setexport_wrap },
    9431005  { N_("exportclass"),         SH_SECTION_LOG,  SH_SECTION_NONE,
    9441006    sh_error_export_mask },
     
    9491011    sh_readconf_setFiletime },
    9501012  { N_("setlooptime"),     SH_SECTION_MISC,  SH_SECTION_NONE,
    951     sh_util_setlooptime },
     1013    sh_util_setlooptime_wrap },
    9521014
    9531015#ifdef SH_WITH_MAIL
    9541016  { N_("mailseverity"),      SH_SECTION_LOG,   SH_SECTION_NONE,
    955     sh_error_setseverity },
     1017    sh_error_setseverity_wrap },
    9561018  { N_("mailclass"),         SH_SECTION_LOG,   SH_SECTION_NONE,
    9571019    sh_error_mail_mask },
     
    9781040#endif
    9791041  { N_("setbindaddress"),    SH_SECTION_MISC,  SH_SECTION_NONE,
    980     sh_calls_set_bind_addr },
     1042    sh_calls_set_bind_addr_wrap },
    9811043  { N_("daemon"),            SH_SECTION_MISC,  SH_SECTION_NONE,
    982     sh_unix_setdeamon },
     1044    sh_unix_setdeamon_wrap },
    9831045  { N_("samhainpath"),       SH_SECTION_MISC,  SH_SECTION_NONE,
    9841046    sh_unix_self_hash },
     
    9891051
    9901052  { N_("printseverity"),     SH_SECTION_LOG,   SH_SECTION_NONE,
    991     sh_error_setprint },
     1053    sh_error_setprint_wrap },
    9921054  { N_("printclass"),        SH_SECTION_LOG,   SH_SECTION_NONE,
    9931055    sh_error_print_mask },
    9941056
    9951057  { N_("logseverity"),       SH_SECTION_LOG,   SH_SECTION_NONE,
    996     sh_error_setlog },
     1058    sh_error_setlog_wrap },
    9971059  { N_("logclass"),          SH_SECTION_LOG,   SH_SECTION_NONE,
    9981060    sh_error_log_mask },
    9991061
    10001062  { N_("syslogseverity"),    SH_SECTION_LOG,   SH_SECTION_NONE,
    1001     sh_error_set_syslog },
     1063    sh_error_set_syslog_wrap },
    10021064  { N_("syslogclass"),       SH_SECTION_LOG,   SH_SECTION_NONE,
    10031065    sh_error_syslog_mask },
    10041066#ifdef HAVE_LIBPRELUDE
    10051067  { N_("preludeseverity"),   SH_SECTION_LOG,   SH_SECTION_NONE,
    1006     sh_error_set_prelude },
     1068    sh_error_set_prelude_wrap },
    10071069  { N_("preludeclass"),      SH_SECTION_LOG,   SH_SECTION_NONE,
    10081070    sh_error_prelude_mask },
Note: See TracChangeset for help on using the changeset viewer.