P | |
page, Xymon_Alerting | |
param, NagiosConfig | |
param_def, NagiosConfig | |
parameter, Sudoers | |
parameter_flag, Sudoers | |
parameter_integer, Sudoers | |
parameter_list, Sudoers | |
parameter_lists, Sudoers | |
parameter_string, Sudoers | |
parameters, Rabbitmq | |
params, Gshadow | |
pass_entry, JMXPassword | |
password, Passwd | |
password_arg, Grub | |
path | |
period, Anacron | |
period_name, Anacron | |
pin, AptPreferences | |
pin_gen, AptPreferences | |
pin_keys, AptPreferences | |
pin_options, AptPreferences | |
plus, Channels | |
port, Services | |
port_range, Services | |
prefixlen, Keepalived | |
primary_entry, OpenShift_Config | |
program, Syslog | |
programs, Syslog | |
prop_filter, Rsyslog | |
protocol, Services | |
Q | |
quote_opt_nil, Test_Quote | |
quote_spaces, Quote | |
quoted, Erlang | |
R | |
rabbit, Rabbitmq | |
reaction, Nsswitch | |
real_server_field, Keepalived | |
realm_entry, JettyRealm | |
recipient, Xymon_Alerting | |
record | |
record_local, Pg_Hba | |
record_noempty, IniFile | |
record_remote, Pg_Hba | |
recover, Xymon_Alerting | |
refid_re, Ntpd | |
repeat, Xymon_Alerting | |
reset_counters, Puppet_Auth | |
rspace, Erlang | |
rtable_re, Ntpd | |
rule, Xymon_Alerting | |
rule_filter, Xymon_Alerting | |
runas_alias, Sudoers | |
runas_spec, Sudoers |
The (ex)?page filter definition
let page = kw_word /(EX)?PAGE/
Params can have sub params
let param = [ Util.indent . param_def . [ Sep.space . param_def ]* . Util.eol ]
define a field
let param_def = let space_in = /[^ \t\n][^\n=]*[^ \t\n]|[^ \t\n]/ in key /[A-Za-z0-9_]+/ . Sep.opt_space . Sep.equal . Sep.opt_space . store space_in
A single parameter for defaults
let parameter = parameter_flag | parameter_integer | parameter_string | parameter_lists
A flag parameter for defaults
let parameter_flag_kw = "always_set_home" | "authenticate" | "env_editor" | "env_reset" | "fqdn" | "ignore_dot" | "ignore_local_sudoers" | "insults" | "log_host" | "log_year" | "long_otp_prompt" | "mail_always" | "mail_badpass" | "mail_no_host" | "mail_no_perms" | "mail_no_user" | "noexec" | "path_info" | "passprompt_override" | "preserve_groups" | "requiretty" | "root_sudo" | "rootpw" | "runaspw" | "set_home" | "set_logname" | "setenv" | "shell_noargs" | "stay_setuid" | "targetpw" | "tty_tickets" | "visiblepw" | "closefrom_override" | "closefrom_override" | "compress_io" | "fast_glob" | "log_input" | "log_output" | "pwfeedback" | "umask_override" | "use_pty"
An integer parameter for defaults
let parameter_integer_nobool_kw = "passwd_tries"
A list of comma-separated parameters for defaults
let parameter_list = parameter . ( sep_com . parameter )*
A single list parameter for defaults
let parameter_lists_kw = "env_check" | "env_delete" | "env_keep"
A string parameter for defaults
let parameter_string_nobool_kw = "badpass_message" | "editor" | "mailsub" | "noexec_file" | "passprompt" | "runas_default" | "syslog_badpri" | "syslog_goodpri" | "timestampdir" | "timestampowner" | "secure_path"
Top-level parameters for the lens
let parameters = listeners | ssl_options | disk_free_limit | log_levels | Erlang.value "vm_memory_high_watermark" Erlang.decimal | Erlang.value "frame_max" Erlang.integer | Erlang.value "heartbeat" Erlang.integer | Erlang.value /default_(vhost|user|pass)/ Erlang.glob | Erlang.value_list "default_user_tags" Erlang.bare | Erlang.value_list "default_permissions" Erlang.glob | cluster_nodes | Erlang.value_list "server_properties" Erlang.bare | Erlang.value "collect_statistics" Erlang.bare | Erlang.value "collect_statistics_interval" Erlang.integer | Erlang.value_list "auth_mechanisms" Erlang.quoted | Erlang.value_list "auth_backends" Erlang.bare | Erlang.value "delegate_count" Erlang.integer | Erlang.value_list "trace_vhosts" Erlang.bare | tcp_listen_options | Erlang.value "hipe_compile" Erlang.boolean | Erlang.value "msg_store_index_module" Erlang.bare | Erlang.value "backing_queue_module" Erlang.bare | Erlang.value "msg_store_file_size_limit" Erlang.integer | Erlang.value "queue_index_max_ journal_entries" Erlang.integer
let params = [ label "password" . store password . colon ] . admin_list? . colon . member_list?
let pass_entry = [ label "user" . [ label "username" . store Rx.word ] . Sep.space . [ label "password" . store Rx.no_spaces ] . Util.eol ]
pw_passwd
let password = [ label "password" . sto_to_col? . colon ]
let password_arg = [ command "password" "" . (spc . [ switch "md5" ])? . (spc . [ switch "encrypted" ])? . spc . store (/[^ \t\n]+/ - /--[^ \t\n]+/) . (spc . [ label "file" . store /[^ \t\n]+/ ])? . eol ]
let path = /[^-+#: \t\n][^#: \t\n]*/
Store a path (quoted)
let path = quoted
let path = [ label "path" . store /[^# \t\n][^ \t\n]*/ . Util.eol ]
let period = [ label "period" . store Rx.integer ]
In the format “@keyword”
let period_name = [ label "period_name" . Util.del_str "@" . store period_name_re ]
let pin = let pin_value = pin_options | version_pin | origin_pin in Build.key_value_line "Pin" colon pin_value
A generic pin
let pin_gen (lbl:string) = store lbl . [ label lbl . Sep.space . store Rx.no_spaces ]
let pin_keys = let space_in = store /[^, \r\t\n][^,\n]*[^, \r\t\n]|[^, \t\n\r]/ in Build.key_value /[aclnov]/ Sep.equal space_in
let pin_options = let comma = Util.delim "," in store "release" . Sep.space . Build.opt_list pin_keys comma
let plus = Util.del_str "+"
let port = [ label "port" . store num_re ]
let port_range = [ label "start" . store num_re ] . Util.del_str "-" . [ label "end" . store num_re ]
A prefix for IP addresses
let prefixlen = [ label "prefixlen" . Util.del_str "/" . sto_num ]
let primary_entry = Build.key_value_line Rx.word Sep.equal Quote.any_opt
a program begins with an optional hash, a bang, and an optional + or -
let program = [ label "program" . opt_hash . bang . ( opt_plus | [ Build.xchgs "-" "reverse" ] ) . programs . eol . entries ]
a list of programs
let programs = label_opt_list_or "program" (store word) comma "*"
Parses property-based filters, which start with “:” and the property name
let prop_filter = let sep = Sep.comma . Util.del_ws_spc in let prop_name = [ Util.del_str ":" . label "property" . store Rx.word ] in let prop_oper = [ label "operation" . store /[A-Za-z!-]+/ ] in let prop_val = [ label "value" . Quote.do_dquote (store /[^\n"]*/) ] in let prop_act = [ label "action" . action ] in [ label "filter" . prop_name . sep . prop_oper . sep . prop_val . Sep.space . prop_act . Util.eol ]
let protocol = [ label "protocol" . store protocol_re ]
let quote_opt_nil = let body = store Quote.any_opt_re in [ label "quote_opt_nil" . Quote.do_quote_opt_nil body ]?
Make quotes mandatory if value contains spaces, and optional if value doesn’t contain spaces.
let quote_spaces (lns:lens) =
The rabbit Erlang.application config
let rabbit = Erlang.application "rabbit" parameters
The reaction on lookup result like `[NOTFOUND=return]’ TODO: Use case-insensitive regexps when ticket #147 is fixed.
let reaction = let status_kw = /[Ss][Uu][Cc][Cc][Ee][Ss][Ss]/ | /[Nn][Oo][Tt][Ff][Oo][Uu][Nn][Dd]/ | /[Uu][Nn][Aa][Vv][Aa][Ii][Ll]/ | /[Tt][Rr][Yy][Aa][Gg][Aa][Ii][Nn]/ in let action_kw = /[Rr][Ee][Tt][Uu][Rr][Nn]/ | /[Cc][Oo][Nn][Tt][Ii][Nn][Uu][Ee]/ in let negate = [ Util.del_str "!" . label "negate" ] in let reaction_entry = [ label "status" . negate? . store status_kw . Util.del_str "=" . [ label "action" . store action_kw ] ] in Util.del_str "[" . [ label "reaction" . (Build.opt_list reaction_entry Sep.space) ] . Util.del_str "]"
let real_server_field = let num_re = "weight" in let flag_re = "inhibit_on_failure" in let to_eol_re = /notify_(up|down)/ in field num_re sto_num | flag flag_re | field to_eol_re sto_to_eol | block "TCP_CHECK" tcp_check_field | block "MISC_CHECK" misc_check_field | block "SMTP_CHECK" smtp_check_field | block /(HTTP|SSL)_GET/ http_check_field
let realm_entry = [ label "user" . [ label "username" . store Rx.word ] . del /[ \t]*:[ \t]*/ ": " . [ label "password" . store Rx.word ] . [ label "realm" . comma_sep . store Rx.word ]* . Util.eol ]
Recipients are made out of any of the above recipient definitions
let recipient = mail | script | ignore | format | repeat | unmatched | stop | macro
An sssd.conf record
let record = IniFile.record title entry
let record = IniFile.record title entry
let record = [ seq "record" . entries+ ]
let record = [ Util.indent . seq "source" . [ label "type" . store word ] . sep_ws . [ label "uri" . store word ] . sep_ws . [ label "distribution" . store word ] . [ label "component" . sep_ws . store word ]* . del /[ \t]*(#.*)?/ "" . eol ]
let record = IniFile.record title entry
let record = let moreusers = Build.opt_list [ label "moreusers" . store word ] Sep.comma in [ seq "host" . [ label "host" . store word ] . Util.del_ws_tab . [ label "dhcp" . store word ] . Util.del_ws_tab . [ label "user" . store word ] . (Util.del_ws_tab . moreusers)? . (Util.comment|Util.eol) ]
A crypttab record
let record = [ seq "entry" . [ label "target" . store target ] . sep_tab . [ label "device" . store fspath ] . (sep_tab . [ label "password" . store fspath ] . ( sep_tab . comma_sep_list "opt")? )? . eol ]
Keyword, followed by optional whitespace and value, followed by EOL.
let record = [ key keyword . (sep_spc . store word)? . eol ]
Generic INI File record
let record (title:lens) (entry:lens) = record_noempty title ( entry | empty )
A login.defs record
let record = let value = store /[^ \t\n]+([ \t]+[^ \t\n]+)*/ in [ key Rx.word . Sep.space . value . Util.eol ]
let record = [ key word . (Util.del_ws_tab . sto_line)? . Util.eol ]
A sequence of record_local or record_remote entries
let record = [ seq "entries" . (record_local | record_remote) . eol ]
let record = [ label "pattern" . store /[A-Za-z0-9@\*.-]+/ . space_or_eol . (transport | nexthop_smtp) . Util.eol ]
let record = let destinations = Build.opt_list destination comma in [ label "pattern" . word . space_or_eol Rx.space " " . destinations . Util.eol ]
let record = let operator = [ label "operator" . store "~" ] in [ Util.indent . key "path" . (Sep.space . operator)? . Sep.space . store /[^~# \t\n][^#\n]*[^# \t\n]|[^~# \t\n]/ . Util.eol . reset_counters . (Util.empty | Util.comment | setting)* . setting ]
An IniFile.record
let record = IniFile.record title entry
A standard /etc/services record TODO: make sure a space is added before a comment on new nodes
let record = [ label "service-name" . store word_re . sep_spc . (port | port_range) . del "/" "/" . protocol . ( sep_spc . alias )* . comment_or_eol ]
Use the non-indented empty
let record = IniFile.record_noempty title (entry|empty)
An IniFile.record
let record = IniFile.record title (entry|include)
when type is “local”, there is no “address” field
let record_local = [ label "type" . store "local" ] . Sep.tab . database . Sep.tab . user . Sep.tab . method
INI File Record with no empty lines allowed.
let record_noempty (title:lens) (entry:lens) = [ title . entry* ]
let record_remote = [ label "type" . store remtypes ] . Sep.tab . database . Sep.tab . user . Sep.tab . address . Sep.tab . method
The recover filter definition
let recover = flag "RECOVER"
string with length < 5
let refid_re = /[A-Za-z0-9_.-]{1,5}/
The repeat recipient definition
let repeat = kw_word_filters_opt "REPEAT"
let reset_counters = counter "environment" . counter "method" . counter "allow" . counter "allow_ip"
Add spaces to the right of char
let rspace (char:string) = del (char . /[ \t\n]*/ ) char
let rtable_re = Rx.byte
Rules are made of rule_filter and then recipients sperarated by a whitespace
let rule = [ seq "rules" . filters . ws_or_eol . recipients . eol ]
Filters are made out of any of the above filter definitions
let rule_filter = page | group | host | service | color | time | duration | recover | notice
Run_Alias, see alias_field
let runas_alias = alias_entry "Runas_Alias" "runas_user" sto_to_com
A runas specification for spec, using alias_list for listing users and/or groups used to run a command
let runas_spec_user = alias_list "runas_user" sto_to_com