I | |
identifier, Xorg | |
includes, Xinetd | |
indent | |
indented_entry, IniFile | |
indented_title, IniFile | |
IniFile | |
input_device, Xorg | |
int, Xorg | |
Internal primitives, IniFile | |
Iptables | |
K | |
Keepalived | |
L | |
LENS, IniFile | |
Lens definition, IniFile | |
Lens usage, IniFile | |
Lens Usage | |
LENS&FILTER, Sudoers | |
LENSES, Services | |
License | |
Limitations, Exports | |
line, Keepalived | |
lns | |
lns_noempty, IniFile | |
Lokkit | |
M | |
minute, Cron | |
Modprobe | |
month, Cron | |
N | |
negate_node, Sudoers | |
num, Cron | |
O | |
option, Xorg | |
P | |
paramater_list, Sudoers | |
parameter, Sudoers | |
parameter_flag, Sudoers | |
parameter_integer, Sudoers | |
parameter_lists, Sudoers | |
parameter_string, Sudoers | |
Pbuilder | |
port, Services | |
protocol, Services | |
Q | |
quoted_string_val, Xorg | |
R | |
record | |
RECORD, IniFile | |
Record definition, IniFile | |
record_label_re, IniFile | |
record_noempty, IniFile | |
record_re, IniFile | |
Reference | |
runas_alias, Sudoers | |
runas_spec, Sudoers | |
Rx |
let identifier = entry_str "Identifier" /[iI]dentifier/
It would be nice if we could use the directories given in include and includedir directives to parse additional files instead of hardcoding all the places where xinetd config files can be found; but that is currently not possible, and implementing that has a good amount of hairy corner cases to consider.
let includes = [ key /include|includedir/ . Util.del_ws_spc . store /[^ \t\n]+/ . eol ]
let indent = Util.indent
let indent = del /[ \t]*/ ""
Delete indentation, including leading whitespace
let indent = del /[ \t]*/ ""
let indent = Util.indent
Generic INI File entry that might be indented with an arbitrary amount of whitespace
let indented_entry ( kw:regexp ) (sep:lens) (comment:lens) = [ Util.del_opt_ws "" . key kw . sep . sto_to_comment? . (comment|eol) ] | comment
Title for record.
let indented_title ( kw:regexp ) = Util.del_opt_ws "" . Util.del_str "[" . key kw . Util.del_str "]". eol
let input_device = [ indent . del /[iI]nput[dD]evice/ "InputDevice" . label "InputDevice" . sep_spc . quoted_string_val . [ label "option" . sep_spc . quoted_string_val ]* . eol ]
let int = /[0-9]+/
Lines are made of a name, followed by a list of one of more arguments separated by a space.
let line = let arguments = Build.opt_list argument Sep.space in Build.key_value Rx.word Sep.space arguments
The cron lens
let lns = ( empty | comment | shellvar | entry )*
Any number of empty lines, comments, and records.
let lns = ( empty | comment | record ) *
Generic INI File lens
let lns ( record:lens ) (comment:lens) = lns_noempty record (comment|empty)
The lens is a series of blocks, with optional empty lines and comments before, between and after them.
let lns = let empty_or_comment = ( Util.empty | Util.comment )* in
let lns = ( empty | comment | record )*
The sudoers lens, any amount of
let lns = ( empty | comment | alias | defaults | spec )*
The xorg.conf lens
let lns = ( empty | comment | section )*
Generic INI File lens with no empty lines
let lns_noempty ( record:lens ) (comment:lens) = comment* . record*
let minute = [ label "minute" . store num ]
let month = [ label "month" . store alphanum ]
Negation of boolean values for defaults.
let negate_node = [ del "!" "!" . label "negate" ]
let num = /[0-9\*][0-9\/,-\*]*/
let option = [ indent . del /[oO]ption/ "Option" . label "Option" . sep_spc . quoted_string_val . [ label "value" . sep_spc . quoted_string_val ]* . eol ]
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"
An integer parameter for defaults
let parameter_integer_nobool_kw = "passwd_tries"
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"
let port = [ label "port" . store num_re ]
let protocol = [ label "protocol" . store protocol_re ]
let quoted_string_val = del "\"" "\"" . store /[^"\n]+/ . del "\"" "\""
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 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 . del "/" "/" . protocol . ( sep_spc . alias )* . (comment|eol) ]
Default regexp for title_label keyword pattern
let record_label_re = /[^]\n]+/
INI File Record with no empty lines allowed.
let record_noempty ( title:lens ) (entry:lens) = [ title . entry* ]
Default regexp for title keyword pattern
let record_re = ( /[^]\n\/]+/ - /#comment/ )
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
let runas_spec = Util.del_str "(" . alias_list "runas_user" sto_to_com . Util.del_str ")" . sep_cont_opt