;; ! THIS FILE CONTAINS AN INITIALIZATION SCHEME FOR CONFIG READER ;; ! PLEASE DO NOT MODIFY THIS FILE (version 1000) (serializator "logdaemon" (define "fast" 3u '("compress/rate")) (define "best" 7u '("compress/rate")) (define "without" 0u '("compress/rate")) (define "ban" 0u '("acl")) (define "unban" 1u '("acl")) (define "reload" 2u '("acl")) (define "load" 3u '("acl")) (define "lookup" 4u '("acl")) (define "status" 5u '("acl")) (define "sha1" "SCRAM-SHA-1" '("password")) (define "sha256" "SCRAM-SHA-256" '("password")) (define "sha512" "SCRAM-SHA-512" '("password")) ;; ---- Scheme declaration ;; --- GLOBAL (procedure "search/window" (arg "l_searchwindow" int) ) (procedure "retry" (arg "l_retry" uint) ) (procedure "score" (arg "l_score" uint) ) (procedure "bantime" (arg "l_bantime" int) ) (procedure "ignore/hosts" (arg "l_ignore_hosts" vector string) ) (procedure "ignore/users" (arg "l_ignore_users" vector string) ) (procedure "global" (proc "lp_searchwindow" '("search/window")) (proc "lp_retry" '("retry")) (proc "lp_score" '("score")) (proc "lp_bantime" '("bantime")) (proc "lp_ignore_hosts" '("ignore/hosts")) (proc "lp_ignore_users" '("ignore/users")) ) ;; --- JAIL (procedure "pwuser" (arg "l_pwuser" string) ) (procedure "chroot" (arg "l_chroot" boolean) ) (procedure "capsicum" (arg "l_capsicum" boolean) ) (procedure "signalguard" (arg "l_signalguard" uint) ) (procedure "jail" (proc "lp_pwuser" '("pwuser") (proc-allow '(optional)) ) (proc "lp_chroot" '("chroot")) (proc "lp_capsicum" '("capsicum") (proc-allow '(optional)) ) (proc "lp_signalguard" '("signalguard")) ) ;; --- ACTION (procedure "threads/worker" (arg "l_threads_worker" uint) ) (procedure "threads/blocking" (arg "l_threads_blocking" uint) ) (procedure "parallel-actions" (arg "l_parallel_actions" uint) ) (procedure "action" (proc "lp_threads_worker" '("threads/worker")) (proc "lp_threads_blocking" '("threads/blocking") (proc-allow '(optional)) ) (proc "lp_parallel_actions" '("parallel-actions") (proc-allow '(optional)) ) ) ;; --- CONTROL (procedure "unix" (arg "l_source" string) (arg "l_mod" uint) ) (procedure "tcp" (arg "l_source" string) (arg "l_mod" uint) ) (procedure "limit-requests" (arg "l_limit_req" uint) ) (procedure "timeout-read" (arg "l_tm_rd" uint) ) (procedure "password" (arg "l_sha" symbol string) (arg "l_b64_salted_passwd" string) (arg "l_b64_salt" string) (arg "l_iterations" uint) ) (procedure "log" (arg "l_log" boolean) ) (procedure "force-acl" (arg "l_force_acl" boolean) ) (procedure "path" (arg "l_path" string) ) (procedure "name" (arg "l_name" string) ) (procedure "cidr" (arg "l_cidr" string) ) (procedure "acl" (arg "l_title" string) (arg "l_caps" vector symbol uint) (proc "lp_ent_source" '("cidr" "path")) (proc "lp_limit_req" '("limit-requests")) ) (procedure "control" (arg "l_ctrl_flag" boolean) (proc "lp_socket" '("unix" "tcp")) (proc "lp_limit_req" '("limit-requests")) (proc "lp_rd_tm" '("timeout-read")) (proc "lp_name" '("name")) (proc "lp_password" '("password") (proc-allow '(optional)) ) (proc "lp_force_acl" '("force-acl")) (proc "lp_log" '("log")) (proc "lp_acl" '("acl") (proc-allow '(optional collection)) ) ) ;;; ---- SOCKTHREAD (procedure "threads" (arg "l_threads" uint) ) (procedure "sockthread" (proc "lp_threads" '("threads")) ) ;;; --- ENTITY-WORKER (procedure "limit/treesize" (arg "l_lim" uint) ) (procedure "logging" (arg "l_logging" vector string) ) ;;;; -- DB (procedure "rotate" (arg "l_rotate" uint)) (procedure "compress" (arg "l_compress" boolean)) (procedure "none" (procedure_empty)) (procedure "file" (proc "lp_dir_path" '("path")) (proc "lp_rotate" '("rotate") (proc-allow '(optional))) (proc "lp_compress" '("compress")) ) (procedure "sqlite" (proc "lp_sqlite_dir_path" '("path")) ) (procedure "network" (arg "l_addr" string) (arg "l_port" uint) ) (procedure "local" (arg "l_path" string) ) (procedure "db/name" (arg "l_dbname" string)) (procedure "db/username" (arg "l_username" string)) (procedure "db/password" (arg "l_password" string)) (procedure "compress/rate" (arg "l_comp_rate" symbol uint)) (procedure "pkcs12" (arg "l_cert_path" string) (arg "l_cert_pass" string) ) (procedure "rootca" (arg "l_rootca" string)) (procedure "accept_inv_certs" (arg "l_acpt" boolean)) (procedure "skip_dom_validation" (arg "l_skip" boolean)) (procedure "usessl" (proc "lp_pkcs12" '("pkcs12") (proc-allow '(optional))) (proc "lp_rootca" '("rootca") (proc-allow '(optional))) (proc "lp_acpt" '("accept_inv_certs")) (proc "lp_skip" '("skip_dom_validation")) ) (procedure "mysql" (proc "lp_dest" '("network" "local")) (proc "lp_dbname" '("db/name")) (proc "lp_username" '("db/username")) (proc "lp_password" '("db/password") (proc-allow '(optional))) (proc "lp_comp_rate" '("compress/rate") (proc-allow '(optional))) (proc "lp_usessl" '("usessl") (proc-allow '(optional))) ) (enum "DestinationType" '("network" "local") (enumopt "network" "Network" (struct none none (field "addr" (f/string '("l_addr"))) (field "port" (f/uint '("l_port") (val/width word) ; 2 ) ) ) ) (enumopt "local" "Local" (struct none none (field "path" (f/string '("l_path"))) (field "chmod" (f/uint '("l_mod") (val/width word) ; 2 ) ) ) ) ) (procedure "database" (proc "lp_db" '("none" "file" "sqlite" "mysql")) ) (procedure "entity-worker" (proc "lpa_lim" '("limit/treesize")) (proc "lpa_logging" '("logging") (proc-allow '(optional))) (proc "lpa_database" '("database")) ) ;;; ---- PARSER ;; -- (threads) from LOGFETCH ;; -- (logging) from ACCESSMAN ;; -- (database) from ACCESSMAN (procedure "parser" (proc "lpa_logging" '("logging") (proc-allow '(optional))) (proc "lpa_database" '("database")) ) (rootprocedure (proc "lpm_global" '("global")) (proc "lpm_jail" '("jail")) (proc "lpm_action" '("action")) (proc "lpm_control" '("control")) (proc "lpm_ent_worker" '("entity-worker")) (proc "lpm_sockthread" '("sockthread")) (proc "lpm_parser" '("parser")) ) ;; ---- Serialization logic ----- (enum "SocketType" '("unix" "tcp") (enumopt "unix" "Unix" (struct none none (field "path" (f/string '("l_source"))) (field "chmod" (f/uint '("l_mod") (val/width word) ; 2 ) ) ) ) (enumopt "tcp" "Tcp" (struct none none (field "addr" (f/string '("l_source"))) (field "port" (f/uint '("l_mod") (val/width word) ; 2 ) ) ) ) ) (enum "LdAclEntity" '("cidr" "path") (enumopt "cidr" "Cidr" (vec (field "cidr" (f/string '("l_cidr")))) ) (enumopt "path" "Lfs" (vec (field "path" (f/string '("l_path")))) ) ) (enum "Database" '("none" "file" "sqlite" "mysql") (enumopt "none" "None" (empty) ) (enumopt "file" "File" (struct none none (field "dir_path" (f/string '("lp_dir_path" "l_path"))) (field "rotate_size" (f/optional) (f/uint '("lp_rotate" "l_rotate"))) (field "compress" (f/optional) (f/boolean '("lp_compress" "l_compress"))) ) ) (enumopt "sqlite" "Sqlite" (struct none none (field "dir_path" (f/string '("lp_sqlite_dir_path" "l_path"))) ) ) (enumopt "mysql" "Mysql" (struct none none (field "dest" (f/enum '("lp_dest"))) (field "dbname" (f/string '("lp_dbname" "l_dbname"))) (field "username" (f/string '("lp_username" "l_username"))) (field "password" (f/optional) (f/string '("lp_password" "l_password"))) (field "compr" (f/optional) (f/uint '("lp_comp_rate" "l_comp_rate"))) (field "ssl" (f/optional) (f/struct '("lp_usessl"))) ) ) ) (struct "MysqlSslPkcs" "pkcs12" (field "path_to_cert" (f/string '("l_cert_path"))) (field "password" (f/string '("l_cert_pass"))) ) (struct "MysqlSsl" "usessl" (field "pkcs12" (f/optional) (f/struct '("lp_pkcs12"))) (field "path_to_ca" (f/optional) (f/string '("lp_rootca" ))); "l_rootca" (field "accpet_inv_certs" (f/boolean '("lp_acpt" "l_acpt"))) (field "skip_dom_validation" (f/boolean '("lp_skip" "l_skip"))) ) (struct "LdCtrlAcl" "acl" (field "aclname" (f/string '("l_title"))) (field "caplist" (f/vector (f/uint '("l_caps") (val/width word) ; 2 ) ) ) (field "entity" (f/enum '("lp_ent_source"))) (field "limit" (f/uint '("lp_limit_req" "l_limit_req"))) ) (struct "LdCtrlPassword" "password" (field "shatype" (f/string '("l_sha"))) (field "salted_password_b64" (f/string '("l_b64_salted_passwd"))) (field "salt_b64" (f/string '("l_b64_salt"))) (field "iterations" (f/uint '("l_iterations") (val/width dword) ; 2 ) ) ) (struct "LdGlobal" "global" (field "searchwin" (f/int '("lp_searchwindow" "l_searchwindow"))) (field "retrycnt" (f/uint '("lp_retry" "l_retry"))) (field "maxscore" (f/uint '("lp_score" "l_score"))) (field "bantime" (f/int '("lp_bantime" "l_bantime"))) (field "ignhosts" (f/vector (f/string '("lp_ignore_hosts" "l_ignore_hosts")))) (field "ignusers" (f/vector (f/string '("lp_ignore_users" "l_ignore_users")))) ) (struct "LdJail" "jail" (field "pwuser" (f/optional) (f/string '("lp_pwuser" "l_pwuser"))) (field "chroot" (f/optional) (f/boolean '("lp_chroot" "l_chroot"))) (field "capsicum_flag" (f/optional) (f/boolean '("lp_capsicum" "l_capsicum"))) (field "sigguard_max" (f/optional) (f/uint '("lp_signalguard" "l_signalguard") (val/width dword) ; 4 ) ) ) (struct "LdActionThreadExec" "action" (field "thr_worker" (f/uint '("lp_threads_worker" "l_threads_worker"))) (field "thr_block" (f/optional) (f/uint '("lp_threads_blocking" "l_threads_blocking"))) (field "par_acts" (f/optional) (f/uint '("lp_parallel_actions" "l_parallel_actions"))) ) (struct "LdControl" "control" (field "enabled" (f/boolean '("l_ctrl_flag"))) (field "source" (f/enum '("lp_socket"))) (field "limitconn" (f/uint '("lp_limit_req" "l_limit_req") (val/width word) ; 2 ) ) (field "readtimeout" (f/uint '("lp_rd_tm" "l_tm_rd"))) (field "servname" (f/string '("lp_name" "l_name"))) (field "password" (f/optional) (f/struct '("lp_password"))) (field "force_acl" (f/boolean '("lp_force_acl" "l_force_acl"))) (field "enablelog" (f/boolean '("lp_log" "l_log"))) (field "acls" (f/optional) (f/vector (f/struct '("lp_acl")))) ) (struct "LdEntityWorker" "entity-worker" (field "ramlimit" (f/uint '("lpa_lim" "l_lim"))) (field "log_facilities" (f/optional) (f/vector (f/string '("lpa_logging" "l_logging")))) (field "database" (f/enum '("lpa_database" "lp_db"))) ) (struct "LdSockThread" "sockthread" (field "threads" (f/uint '("lp_threads" "l_threads"))) ) (struct "LdParser" "parser" (field "log_facilities" (f/optional) (f/vector (f/string '("lpa_logging" "l_logging")))) (field "database" (f/enum '("lpa_database" "lp_db"))) ) (rootstruct "LdLogDaemon" (field "global" (f/struct '("lpm_global"))) (field "jail" (f/struct '("lpm_jail"))) (field "action_exec" (f/struct '("lpm_action"))) (field "control" (f/struct '("lpm_control"))) (field "ent_worker" (f/struct '("lpm_ent_worker"))) (field "sockthread" (f/struct '("lpm_sockthread"))) (field "parser" (f/struct '("lpm_parser"))) ) )