Changeset 22 for trunk/src/sh_readconf.c
- Timestamp:
- Feb 23, 2006, 12:03:58 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_readconf.c
r20 r22 52 52 #endif 53 53 54 extern int set_reverse_lookup (c har * c);54 extern int set_reverse_lookup (const char * c); 55 55 56 56 #undef FIL__ … … 282 282 /* The system type, release, and machine. 283 283 */ 284 sprintf(myident, _("%s:%s:%s"), /* known to fit */ 285 sh.host.system, sh.host.release, sh.host.machine); 284 sl_snprintf(myident, sizeof(myident), _("%s:%s:%s"), 285 sh.host.system, /* flawfinder: ignore */ 286 sh.host.release, sh.host.machine); 286 287 287 288 … … 580 581 } 581 582 582 int sh_readconf_set_path (char * which, c har * what)583 int sh_readconf_set_path (char * which, const char * what) 583 584 { 584 585 int len; … … 621 622 } 622 623 623 int sh_readconf_set_database_path (c har * what)624 int sh_readconf_set_database_path (const char * what) 624 625 { 625 626 return (sh_readconf_set_path(sh.data.path, what)); 626 627 } 627 628 628 int sh_readconf_set_logfile_path (c har * what)629 int sh_readconf_set_logfile_path (const char * what) 629 630 { 630 631 return (sh_readconf_set_path(sh.srvlog.name, what)); 631 632 } 632 633 633 int sh_readconf_set_lockfile_path (c har * what)634 int sh_readconf_set_lockfile_path (const char * what) 634 635 { 635 636 return( sh_readconf_set_path(sh.srvlog.alt, what)); … … 645 646 646 647 647 int sh_readconf_setTime (c har * str, ShTimerItem what)648 int sh_readconf_setTime (const char * str, ShTimerItem what) 648 649 { 649 650 unsigned long i = atoi (str); … … 674 675 } 675 676 676 int sh_readconf_setMailtime (c har * c)677 int sh_readconf_setMailtime (const char * c) 677 678 { 678 679 return sh_readconf_setTime (c, SET_MAILTIME); 679 680 } 680 681 681 int sh_readconf_setFiletime (c har * c)682 int sh_readconf_setFiletime (const char * c) 682 683 { 683 684 return sh_readconf_setTime (c, SET_FILETIME); 684 685 } 685 686 686 int sh_readconf_set_nice (c har * c)687 int sh_readconf_set_nice (const char * c) 687 688 { 688 689 long val; … … 704 705 705 706 #ifdef FANCY_LIBCAP 706 int sh_readconf_setCaps(c har * c)707 int sh_readconf_setCaps(const char * c) 707 708 { 708 709 int i; … … 718 719 ShSectionType section; 719 720 ShSectionType alt_section; 720 int (*func)(c har * opt);721 int (*func)(const char * opt); 721 722 } cfg_options; 722 723 723 724 #if defined (SH_WITH_CLIENT) || defined (SH_STANDALONE) 724 extern int sh_set_schedule_one(c har * str);725 extern int sh_set_schedule_two(c har * str);725 extern int sh_set_schedule_one(const char * str); 726 extern int sh_set_schedule_two(const char * str); 726 727 #endif 727 728 #if defined (SH_WITH_SERVER) 728 extern int sh_socket_use (char * c); 729 extern int sh_socket_uid (char * c); 730 extern int sh_socket_password (char * c); 731 #endif 732 733 /* Yes, this isn't very elegant ;) 734 */ 735 #if defined(WITH_EXTERNAL) 736 int 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) 741 int sh_files_setrecursion_wrap (char * str) { 742 return sh_files_setrecursion ((const char *) str); 743 } 744 int sh_util_setchecksum_wrap (char * str) { 745 return sh_util_setchecksum ((const char *) str); 746 } 747 #endif 748 int sh_util_setlooptime_wrap (char * str) { 749 return sh_util_setlooptime ((const char *) str); 750 } 751 #ifdef SH_WITH_MAIL 752 int sh_error_setseverity_wrap (char * str) { 753 return sh_error_setseverity ((const char *) str); 754 } 755 #endif 756 int sh_calls_set_bind_addr_wrap (char * str) { 757 return sh_calls_set_bind_addr ((const char *) str); 758 } 759 int sh_unix_setdeamon_wrap (char * str) { 760 return sh_unix_setdeamon ((const char *) str); 761 } 762 int sh_error_setprint_wrap (char * str) { 763 return sh_error_setprint ((const char *) str); 764 } 765 int sh_error_setlog_wrap (char * str) { 766 return sh_error_setlog ((const char *) str); 767 } 768 int sh_error_set_syslog_wrap (char * str) { 769 return sh_error_set_syslog ((const char *) str); 770 } 771 #ifdef HAVE_LIBPRELUDE 772 int sh_error_set_prelude_wrap (char * str) { 773 return sh_error_set_prelude ((const char *) str); 774 } 775 #endif 776 #ifdef SH_WITH_CLIENT 777 int sh_error_setexport_wrap (char * str) { 778 return sh_error_setexport ((const char *) str); 779 } 780 #endif 781 #ifdef SH_WITH_SERVER 782 int sh_forward_set_strip_wrap (char * str) { 783 return sh_forward_set_strip ((const char *) str); 784 } 785 int sh_unix_set_chroot_wrap (char * str) { 786 return sh_unix_set_chroot ((const char *) str); 787 } 788 #endif 789 #if defined(WITH_DATABASE) 790 int sh_error_set_database_wrap (char * str) { 791 return sh_error_set_database ((const char *) str); 792 } 793 #endif 794 729 extern int sh_socket_use (const char * c); 730 extern int sh_socket_uid (const char * c); 731 extern int sh_socket_password (const char * c); 732 #endif 733 795 734 cfg_options ext_table[] = { 796 735 #if defined(WITH_EXTERNAL) … … 818 757 sh_ext_add_or }, 819 758 { N_("externalseverity"),SH_SECTION_LOG, SH_SECTION_EXTERNAL, 820 sh_error_set_external _wrap},759 sh_error_set_external }, 821 760 { N_("externalclass"), SH_SECTION_LOG, SH_SECTION_EXTERNAL, 822 761 sh_error_external_mask }, … … 845 784 set_enter_wrapper }, 846 785 #endif 786 847 787 848 788 #if defined (SH_WITH_CLIENT) || defined (SH_STANDALONE) … … 902 842 sh_util_obscure_ok }, 903 843 { N_("setrecursionlevel"), SH_SECTION_MISC, SH_SECTION_NONE, 904 sh_files_setrecursion _wrap},844 sh_files_setrecursion }, 905 845 { N_("checksumtest"), SH_SECTION_MISC, SH_SECTION_NONE, 906 sh_util_setchecksum _wrap},846 sh_util_setchecksum }, 907 847 { N_("reportonlyonce"), SH_SECTION_MISC, SH_SECTION_NONE, 908 848 sh_files_reportonce }, … … 961 901 { N_("setprelinkchecksum"), SH_SECTION_MISC, SH_SECTION_NONE, 962 902 sh_prelink_set_hash }, 903 963 904 /* client or standalone 964 905 */ … … 977 918 sh_socket_password }, 978 919 { N_("setstripdomain"), SH_SECTION_SRV, SH_SECTION_MISC, 979 sh_forward_set_strip _wrap},920 sh_forward_set_strip }, 980 921 { N_("useseparatelogs"), SH_SECTION_SRV, SH_SECTION_MISC, 981 922 set_flag_sep_log }, 982 923 { N_("setchrootdir"), SH_SECTION_SRV, SH_SECTION_MISC, 983 sh_unix_set_chroot _wrap},924 sh_unix_set_chroot }, 984 925 { N_("setclienttimelimit"), SH_SECTION_SRV, SH_SECTION_MISC, 985 926 sh_forward_set_time_limit }, … … 1002 943 #ifdef SH_WITH_CLIENT 1003 944 { N_("exportseverity"), SH_SECTION_LOG, SH_SECTION_NONE, 1004 sh_error_setexport _wrap},945 sh_error_setexport }, 1005 946 { N_("exportclass"), SH_SECTION_LOG, SH_SECTION_NONE, 1006 947 sh_error_export_mask }, … … 1011 952 sh_readconf_setFiletime }, 1012 953 { N_("setlooptime"), SH_SECTION_MISC, SH_SECTION_NONE, 1013 sh_util_setlooptime _wrap},954 sh_util_setlooptime }, 1014 955 1015 956 #ifdef SH_WITH_MAIL 1016 957 { N_("mailseverity"), SH_SECTION_LOG, SH_SECTION_NONE, 1017 sh_error_setseverity _wrap},958 sh_error_setseverity }, 1018 959 { N_("mailclass"), SH_SECTION_LOG, SH_SECTION_NONE, 1019 960 sh_error_mail_mask }, … … 1040 981 #endif 1041 982 { N_("setbindaddress"), SH_SECTION_MISC, SH_SECTION_NONE, 1042 sh_calls_set_bind_addr _wrap},983 sh_calls_set_bind_addr }, 1043 984 { N_("daemon"), SH_SECTION_MISC, SH_SECTION_NONE, 1044 sh_unix_setdeamon _wrap},985 sh_unix_setdeamon }, 1045 986 { N_("samhainpath"), SH_SECTION_MISC, SH_SECTION_NONE, 1046 987 sh_unix_self_hash }, … … 1051 992 1052 993 { N_("printseverity"), SH_SECTION_LOG, SH_SECTION_NONE, 1053 sh_error_setprint _wrap},994 sh_error_setprint }, 1054 995 { N_("printclass"), SH_SECTION_LOG, SH_SECTION_NONE, 1055 996 sh_error_print_mask }, 1056 997 1057 998 { N_("logseverity"), SH_SECTION_LOG, SH_SECTION_NONE, 1058 sh_error_setlog _wrap},999 sh_error_setlog }, 1059 1000 { N_("logclass"), SH_SECTION_LOG, SH_SECTION_NONE, 1060 1001 sh_error_log_mask }, 1061 1002 1062 1003 { N_("syslogseverity"), SH_SECTION_LOG, SH_SECTION_NONE, 1063 sh_error_set_syslog _wrap},1004 sh_error_set_syslog }, 1064 1005 { N_("syslogclass"), SH_SECTION_LOG, SH_SECTION_NONE, 1065 1006 sh_error_syslog_mask }, 1066 1007 #ifdef HAVE_LIBPRELUDE 1067 1008 { N_("preludeseverity"), SH_SECTION_LOG, SH_SECTION_NONE, 1068 sh_error_set_prelude _wrap},1009 sh_error_set_prelude }, 1069 1010 { N_("preludeclass"), SH_SECTION_LOG, SH_SECTION_NONE, 1070 1011 sh_error_prelude_mask },
Note:
See TracChangeset
for help on using the changeset viewer.