Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z

P |
| page, Xymon_Alerting
| Pagekite
| Pam
| PamConf
| 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
| partition, FAI_DiskConfig
| pass_entry, JMXPassword
| Passwd
| password MasterPasswd Passwd Postfix_Passwordmap
| password_arg, Grub
| path Automounter Chrony Erlang Keepalived
| Pbuilder
| percent, Test_Tmpfiles
| percent_tree, Test_Tmpfiles
| period, Anacron
| period_name, Anacron
| period_name_re, Anacron
| Pg_Hba
| Pgbouncer
| phony_conf, Test_Semanage
| pin, AptPreferences aptpreferences.aug tests/test_aptpreferences.aug
| pin_gen, AptPreferences
| pin_keys, AptPreferences
| pin_options, AptPreferences
| pipe, Syslog
| plus Channels Syslog
| port, Services
| port_range, Services
| Postfix_Passwordmap
| Postfix_Transport
| Postfix_Virtual
| Postgresql
| prefixlen, Keepalived
| primary_entry, OpenShift_Config
| program, Syslog
| Program matching, Syslog
| programs, Syslog
| prolog, Test_Xml.Xml
| Prolog and declarations, Test_Xml
| prop_filter, Rsyslog
| protocol Services Syslog
| Protocols
| Puppet_Auth
| Puppetfile
| puppetfileserver.aug
| PylonsPaste
Q |
| Qpid
| qpidc, Test_Qpid
| qpidd, Test_Qpid
| quote, Quote
| Quote
| QUOTE SEPARATORS, Quote
| quote_opt, Quote
| quote_opt_nil Quote Test_Quote
| quote_spaces Quote Test_Quote
| quoted, Erlang
| QUOTED VALUES, Quote
| quoted_non_empty_string_val, Xorg
| quoted_string_val, Xorg
| QUOTING FUNCTIONS, Quote

> let page = kw_word /(EX)?PAGE/

The (ex)?page filter definition
Parses /etc/pagekite.d/
Parses /etc/pam.conf and /etc/pam.d/* service files
Parses /etc/pam.conf files

> let param = [ Util.indent . param_def . [ Sep.space . param_def ]* . Util.eol ]

Params can have sub params

> 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

define a field

> let parameter = parameter_flag | parameter_integer | parameter_string | parameter_lists

A single 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" | "match_group_by_gid" | "always_query_group_plugin"

A flag parameter for defaults

> let parameter_integer_nobool_kw = "passwd_tries"

An integer parameter for defaults

> let parameter_list = parameter . ( sep_com . parameter )*

A list of comma-separated parameters for defaults

> let parameter_lists_kw = "env_check" | "env_delete" | "env_keep"

A single list 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"

A string parameter for defaults

> let parameters = listeners | ssl_options | disk_free_limit | log_levels | Erlang.value /vm_memory_high_watermark(_paging_ratio)?/ 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|embed_msgs_below)/ Erlang.integer | cluster_partition_handling | Erlang.value /(ssl_)?handshake_timeout/ Erlang.integer | Erlang.value "channel_max" Erlang.integer | Erlang.value_list "loopback_users" Erlang.glob | Erlang.value "reverse_dns_lookups" Erlang.boolean | Erlang.value "cluster_keepalive_interval" Erlang.integer | Erlang.value "mnesia_table_loading_timeout" Erlang.integer

Top-level parameters for the lens

> let params = [ label "password" . store password . colon ] . admin_list? . colon . member_list?

> let partition = [ label "partition" . Util.del_str "." . store /[0-9]+/ ]

An optional partition number for disk

> let pass_entry = [ label "user" . [ label "username" . store Rx.word ] . Sep.space . [ label "password" . store Rx.no_spaces ] . Util.eol ]

Parses /etc/passwd

> let password = [ label "password" . sto_to_col? . colon ]

pw_passwd

> let password = [ label "password" . sto_to_col? . colon ]

pw_passwd

> let password = [ label "password" . (store Rx.space_in)? ]

> 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]*/

> let path = Rx.fspath

> let path = quoted

Store a path (quoted)

> let path = [ label "path" . store /[^# \t\n][^ \t\n]*/ . Util.eol ]

Parses /etc/pbuilderrc, /etc/pbuilder/pbuilderrc

> let percent = "m /var/log/%m 2755 root systemdjournal - -\n"

Test with a percent sign

> let percent_tree = { "1" { "type" = "m" } { "path" = "/var/log/%m" } { "mode" = "2755" } { "uid" = "root" } { "gid" = "systemdjournal" } { "age" = "-" } { "argument" = "-" } }

Tree for percent

> let period = [ label "period" . store Rx.integer ]

> let period_name = [ label "period_name" . Util.del_str "@" . store period_name_re ]

In the format “@keyword”

> let period_name_re = "monthly"

The valid values for period_name.
Parses PostgreSQL’s pg_hba.conf
Parses Pgbouncer ini configuration files.

> let phony_conf = "# this is a comment mykey = myvalue # eol comment anotherkey = another value "

> let pin = let pin_value = pin_options | version_pin | origin_pin in Build.key_value_line "Pin" colon pin_value

> let pin_gen (lbl:string) = store lbl . [ label lbl . Sep.space . store Rx.no_spaces ]

A generic pin

> 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 pipe = Util.del_str "|"

Deletes a pipe and default to it

> let plus = Util.del_str "+"

> let plus = Util.del_str "+"

Deletes a plus and default to it

> let port = [ label "port" . store num_re ]

> let port_range = [ label "start" . store num_re ] . Util.del_str "-" . [ label "end" . store num_re ]

Parses /etc/postfix/*passwd
Parses /etc/postfix/transport
Parses /etc/postfix/virtual
Parses postgresql.conf

> let prefixlen = [ label "prefixlen" . Util.del_str "/" . sto_num ]

A prefix for IP addresses

> let primary_entry = Build.key_value_line Rx.word Sep.equal Quote.any_opt

> let program = [ label "program" . opt_hash . bang . ( opt_plus | [ Build.xchgs "-" "reverse" ] ) . programs . eol . entries ]

a program begins with an optional hash, a bang, and an optional + or -

> let programs = label_opt_list_or "program" (store word) comma "*"

a list of programs

> test Xml.prolog get "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" = { "#declaration" { "#attribute" { "version" = "1.0" } { "encoding" = "UTF-8" } } }

The XML prolog tag is mapped in a “#declaration” node, which contains an “#attribute” node with various attributes of the tag.

> let prop_filter = let sep = Sep.comma . Util.del_opt_ws " " 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 ]

Parses property-based filters, which start with “:” and the property name

> let protocol = [ label "protocol" . store protocol_re ]

> let protocol = /@{1,2}/

means UDP means TCP
Parses /etc/protocols
Parses /etc/puppet/auth.conf
Parses libarian-puppet’s Puppetfile format
Parses Pylons Paste ini configuration files.
Parses Apache Qpid daemon/client configuration files

> let qpidc = "# Configuration file for the qpid c++ client library. Entries are of # the form: # name=value ssl-cert-db=/root/certs/server_db ssl-port=5674 "

> let qpidd = "# Configuration file for qpidd. Entries are of the form: # name=value # (Note: no spaces on either side of '='). Using default settings: # \"qpidd --help\" or \"man qpidd\" for more details. cluster-mechanism=ANONYMOUS auth=no max-connections=22000 syslog-name=qpidd1 "

> let quote = del /["']/ "\""

A quote, either double or single, default to double
Generic module providing useful primitives for quoting

> let quote_opt = del /["']?/ "\""

An optional quote, either double or single, default to double

> let quote_opt_nil = del /["']?/ ""

An optional quote, either double or single, default to nothing

> let quote_opt_nil = let body = store Quote.any_opt_re in [ label "quote_opt_nil" . Quote.do_quote_opt_nil body ]?

> let quote_spaces (lns:lens) =

Make quotes mandatory if value contains spaces, and optional if value doesn’t contain spaces.
Store a quoted value

> let quoted_non_empty_string_val = del "\"" "\"" . store /[^"\n]+/ . del "\"" "\""

> let quoted_string_val = del "\"" "\"" . store /[^"\n]*/ . del "\"" "\""

Close