Changes in trunk/src/sh_readconf.c [27:20]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_readconf.c
r27 r20 52 52 #endif 53 53 54 extern int set_reverse_lookup (c onst char * c);54 extern int set_reverse_lookup (char * c); 55 55 56 56 #undef FIL__ … … 69 69 SH_SECTION_USER0, 70 70 SH_SECTION_USER1, 71 SH_SECTION_USER2,72 SH_SECTION_USER3,73 SH_SECTION_USER4,74 71 SH_SECTION_PRELINK, 75 72 #if defined (SH_WITH_MAIL) … … 111 108 { N_("[User0]"), SH_SECTION_USER0}, 112 109 { N_("[User1]"), SH_SECTION_USER1}, 113 { N_("[User2]"), SH_SECTION_USER2},114 { N_("[User3]"), SH_SECTION_USER3},115 { N_("[User4]"), SH_SECTION_USER4},116 110 { N_("[Prelink]"), SH_SECTION_PRELINK}, 117 111 #ifdef WITH_EXTERNAL … … 288 282 /* The system type, release, and machine. 289 283 */ 290 sl_snprintf(myident, sizeof(myident), _("%s:%s:%s"), 291 sh.host.system, /* flawfinder: ignore */ 292 sh.host.release, sh.host.machine); 284 sprintf(myident, _("%s:%s:%s"), /* known to fit */ 285 sh.host.system, sh.host.release, sh.host.machine); 293 286 294 287 … … 587 580 } 588 581 589 int sh_readconf_set_path (char * which, c onst char * what)582 int sh_readconf_set_path (char * which, char * what) 590 583 { 591 584 int len; … … 628 621 } 629 622 630 int sh_readconf_set_database_path (c onst char * what)623 int sh_readconf_set_database_path (char * what) 631 624 { 632 625 return (sh_readconf_set_path(sh.data.path, what)); 633 626 } 634 627 635 int sh_readconf_set_logfile_path (c onst char * what)628 int sh_readconf_set_logfile_path (char * what) 636 629 { 637 630 return (sh_readconf_set_path(sh.srvlog.name, what)); 638 631 } 639 632 640 int sh_readconf_set_lockfile_path (c onst char * what)633 int sh_readconf_set_lockfile_path (char * what) 641 634 { 642 635 return( sh_readconf_set_path(sh.srvlog.alt, what)); … … 652 645 653 646 654 int sh_readconf_setTime (c onst char * str, ShTimerItem what)647 int sh_readconf_setTime (char * str, ShTimerItem what) 655 648 { 656 649 unsigned long i = atoi (str); … … 681 674 } 682 675 683 int sh_readconf_setMailtime (c onst char * c)676 int sh_readconf_setMailtime (char * c) 684 677 { 685 678 return sh_readconf_setTime (c, SET_MAILTIME); 686 679 } 687 680 688 int sh_readconf_setFiletime (c onst char * c)681 int sh_readconf_setFiletime (char * c) 689 682 { 690 683 return sh_readconf_setTime (c, SET_FILETIME); 691 684 } 692 685 693 int sh_readconf_set_nice (c onst char * c)686 int sh_readconf_set_nice (char * c) 694 687 { 695 688 long val; … … 711 704 712 705 #ifdef FANCY_LIBCAP 713 int sh_readconf_setCaps(c onst char * c)706 int sh_readconf_setCaps(char * c) 714 707 { 715 708 int i; … … 725 718 ShSectionType section; 726 719 ShSectionType alt_section; 727 int (*func)(c onst char * opt);720 int (*func)(char * opt); 728 721 } cfg_options; 729 722 730 723 #if defined (SH_WITH_CLIENT) || defined (SH_STANDALONE) 731 extern int sh_set_schedule_one(c onst char * str);732 extern int sh_set_schedule_two(c onst char * str);724 extern int sh_set_schedule_one(char * str); 725 extern int sh_set_schedule_two(char * str); 733 726 #endif 734 727 #if defined (SH_WITH_SERVER) 735 extern int sh_socket_use (const char * c); 736 extern int sh_socket_uid (const char * c); 737 extern int sh_socket_password (const char * c); 738 #endif 739 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 740 795 cfg_options ext_table[] = { 741 796 #if defined(WITH_EXTERNAL) … … 763 818 sh_ext_add_or }, 764 819 { N_("externalseverity"),SH_SECTION_LOG, SH_SECTION_EXTERNAL, 765 sh_error_set_external },820 sh_error_set_external_wrap }, 766 821 { N_("externalclass"), SH_SECTION_LOG, SH_SECTION_EXTERNAL, 767 822 sh_error_external_mask }, … … 790 845 set_enter_wrapper }, 791 846 #endif 792 793 847 794 848 #if defined (SH_WITH_CLIENT) || defined (SH_STANDALONE) … … 826 880 { N_("file"), SH_SECTION_USER1, SH_SECTION_NONE, 827 881 sh_files_pushfile_user1 }, 828 { N_("dir"), SH_SECTION_USER2, SH_SECTION_NONE,829 sh_files_pushdir_user2 },830 { N_("file"), SH_SECTION_USER2, SH_SECTION_NONE,831 sh_files_pushfile_user2 },832 { N_("dir"), SH_SECTION_USER3, SH_SECTION_NONE,833 sh_files_pushdir_user3 },834 { N_("file"), SH_SECTION_USER3, SH_SECTION_NONE,835 sh_files_pushfile_user3 },836 { N_("dir"), SH_SECTION_USER4, SH_SECTION_NONE,837 sh_files_pushdir_user4 },838 { N_("file"), SH_SECTION_USER4, SH_SECTION_NONE,839 sh_files_pushfile_user4 },840 882 { N_("dir"), SH_SECTION_PRELINK, SH_SECTION_NONE, 841 883 sh_files_pushdir_prelink }, … … 860 902 sh_util_obscure_ok }, 861 903 { N_("setrecursionlevel"), SH_SECTION_MISC, SH_SECTION_NONE, 862 sh_files_setrecursion },904 sh_files_setrecursion_wrap }, 863 905 { N_("checksumtest"), SH_SECTION_MISC, SH_SECTION_NONE, 864 sh_util_setchecksum },906 sh_util_setchecksum_wrap }, 865 907 { N_("reportonlyonce"), SH_SECTION_MISC, SH_SECTION_NONE, 866 908 sh_files_reportonce }, … … 911 953 sh_files_redef_user1 }, 912 954 913 { N_("redefuser2"), SH_SECTION_MISC, SH_SECTION_NONE,914 sh_files_redef_user2 },915 916 { N_("redefuser3"), SH_SECTION_MISC, SH_SECTION_NONE,917 sh_files_redef_user3 },918 919 { N_("redefuser4"), SH_SECTION_MISC, SH_SECTION_NONE,920 sh_files_redef_user4 },921 922 955 { N_("redefprelink"), SH_SECTION_MISC, SH_SECTION_NONE, 923 956 sh_files_redef_prelink }, … … 928 961 { N_("setprelinkchecksum"), SH_SECTION_MISC, SH_SECTION_NONE, 929 962 sh_prelink_set_hash }, 930 931 963 /* client or standalone 932 964 */ … … 945 977 sh_socket_password }, 946 978 { N_("setstripdomain"), SH_SECTION_SRV, SH_SECTION_MISC, 947 sh_forward_set_strip },979 sh_forward_set_strip_wrap }, 948 980 { N_("useseparatelogs"), SH_SECTION_SRV, SH_SECTION_MISC, 949 981 set_flag_sep_log }, 950 982 { N_("setchrootdir"), SH_SECTION_SRV, SH_SECTION_MISC, 951 sh_unix_set_chroot },983 sh_unix_set_chroot_wrap }, 952 984 { N_("setclienttimelimit"), SH_SECTION_SRV, SH_SECTION_MISC, 953 985 sh_forward_set_time_limit }, … … 968 1000 #endif 969 1001 970 #if defined(SH_WITH_CLIENT) || defined(SH_WITH_SERVER)1002 #ifdef SH_WITH_CLIENT 971 1003 { N_("exportseverity"), SH_SECTION_LOG, SH_SECTION_NONE, 972 sh_error_setexport },1004 sh_error_setexport_wrap }, 973 1005 { N_("exportclass"), SH_SECTION_LOG, SH_SECTION_NONE, 974 1006 sh_error_export_mask }, 975 #if defined(SH_WITH_SERVER)976 { N_("setlogserver"), SH_SECTION_SRV, SH_SECTION_MISC,977 sh_forward_setlogserver },978 #else979 1007 { N_("setlogserver"), SH_SECTION_CLT, SH_SECTION_MISC, 980 1008 sh_forward_setlogserver }, 981 #endif982 1009 #endif 983 1010 { N_("setfilechecktime"), SH_SECTION_MISC, SH_SECTION_NONE, 984 1011 sh_readconf_setFiletime }, 985 1012 { N_("setlooptime"), SH_SECTION_MISC, SH_SECTION_NONE, 986 sh_util_setlooptime },1013 sh_util_setlooptime_wrap }, 987 1014 988 1015 #ifdef SH_WITH_MAIL 989 1016 { N_("mailseverity"), SH_SECTION_LOG, SH_SECTION_NONE, 990 sh_error_setseverity },1017 sh_error_setseverity_wrap }, 991 1018 { N_("mailclass"), SH_SECTION_LOG, SH_SECTION_NONE, 992 1019 sh_error_mail_mask }, … … 1013 1040 #endif 1014 1041 { N_("setbindaddress"), SH_SECTION_MISC, SH_SECTION_NONE, 1015 sh_calls_set_bind_addr },1042 sh_calls_set_bind_addr_wrap }, 1016 1043 { N_("daemon"), SH_SECTION_MISC, SH_SECTION_NONE, 1017 sh_unix_setdeamon },1044 sh_unix_setdeamon_wrap }, 1018 1045 { N_("samhainpath"), SH_SECTION_MISC, SH_SECTION_NONE, 1019 1046 sh_unix_self_hash }, … … 1024 1051 1025 1052 { N_("printseverity"), SH_SECTION_LOG, SH_SECTION_NONE, 1026 sh_error_setprint },1053 sh_error_setprint_wrap }, 1027 1054 { N_("printclass"), SH_SECTION_LOG, SH_SECTION_NONE, 1028 1055 sh_error_print_mask }, 1029 1056 1030 1057 { N_("logseverity"), SH_SECTION_LOG, SH_SECTION_NONE, 1031 sh_error_setlog },1058 sh_error_setlog_wrap }, 1032 1059 { N_("logclass"), SH_SECTION_LOG, SH_SECTION_NONE, 1033 1060 sh_error_log_mask }, 1034 1061 1035 1062 { N_("syslogseverity"), SH_SECTION_LOG, SH_SECTION_NONE, 1036 sh_error_set_syslog },1063 sh_error_set_syslog_wrap }, 1037 1064 { N_("syslogclass"), SH_SECTION_LOG, SH_SECTION_NONE, 1038 1065 sh_error_syslog_mask }, 1039 1066 #ifdef HAVE_LIBPRELUDE 1040 1067 { N_("preludeseverity"), SH_SECTION_LOG, SH_SECTION_NONE, 1041 sh_error_set_prelude },1068 sh_error_set_prelude_wrap }, 1042 1069 { N_("preludeclass"), SH_SECTION_LOG, SH_SECTION_NONE, 1043 1070 sh_error_prelude_mask }, … … 1120 1147 N_("severityuser0"), 1121 1148 N_("severityuser1"), 1122 N_("severityuser2"),1123 N_("severityuser3"),1124 N_("severityuser4"),1125 1149 N_("severityprelink"), 1126 1150 NULL … … 1139 1163 SH_ERR_T_USER0, 1140 1164 SH_ERR_T_USER1, 1141 SH_ERR_T_USER2,1142 SH_ERR_T_USER3,1143 SH_ERR_T_USER4,1144 1165 SH_ERR_T_PRELINK, 1145 1166 };
Note:
See TracChangeset
for help on using the changeset viewer.