375
|
1 " Vim syntax file
|
|
2 " Language: login.defs(5) configuration file
|
839
|
3 " Maintainer: Nikolai Weibull <now@bitwi.se>
|
2662
|
4 " Latest Revision: 2010-11-29
|
375
|
5
|
|
6 if exists("b:current_syntax")
|
|
7 finish
|
|
8 endif
|
|
9
|
|
10 let s:cpo_save = &cpo
|
|
11 set cpo&vim
|
|
12
|
2662
|
13 syn match logindefsBegin display '^'
|
|
14 \ nextgroup=
|
|
15 \ logindefsComment,
|
|
16 \ @logindefsKeyword
|
|
17 \ skipwhite
|
375
|
18
|
2662
|
19 syn region logindefsComment display oneline start='^\s*#' end='$'
|
|
20 \ contains=logindefsTodo,@Spell
|
375
|
21
|
2662
|
22 syn keyword logindefsTodo contained TODO FIXME XXX NOTE
|
375
|
23
|
2662
|
24 syn cluster logindefsKeyword contains=
|
|
25 \ logindefsBooleanKeyword,
|
|
26 \ logindefsEncryptKeyword,
|
|
27 \ logindefsNumberKeyword,
|
|
28 \ logindefsPathKeyword,
|
|
29 \ logindefsPathsKeyword,
|
|
30 \ logindefsStringKeyword
|
375
|
31
|
2662
|
32 syn keyword logindefsBooleanKeyword contained
|
|
33 \ CHFN_AUTH
|
|
34 \ CHSH_AUTH
|
|
35 \ CREATE_HOME
|
|
36 \ DEFAULT_HOME
|
|
37 \ FAILLOG_ENAB
|
|
38 \ LASTLOG_ENAB
|
|
39 \ LOG_OK_LOGINS
|
|
40 \ LOG_UNKFAIL_ENAB
|
|
41 \ MAIL_CHECK_ENAB
|
|
42 \ MD5_CRYPT_ENAB
|
|
43 \ OBSCURE_CHECKS_ENAB
|
|
44 \ PASS_ALWAYS_WARN
|
|
45 \ PORTTIME_CHECKS_ENAB
|
|
46 \ QUOTAS_ENAB
|
|
47 \ SU_WHEEL_ONLY
|
|
48 \ SYSLOG_SG_ENAB
|
|
49 \ SYSLOG_SU_ENAB
|
|
50 \ USERGROUPS_ENAB
|
|
51 \ nextgroup=logindefsBoolean skipwhite
|
375
|
52
|
2662
|
53 syn keyword logindefsBoolean contained yes no
|
|
54
|
|
55 syn keyword logindefsEncryptKeyword contained
|
|
56 \ ENCRYPT_METHOD
|
|
57 \ nextgroup=logindefsEncryptMethod skipwhite
|
375
|
58
|
2662
|
59 syn keyword logindefsEncryptMethod contained
|
|
60 \ DES
|
|
61 \ MD5
|
|
62 \ SHA256
|
|
63 \ SHA512
|
375
|
64
|
2662
|
65 syn keyword logindefsNumberKeyword contained
|
|
66 \ ERASECHAR
|
|
67 \ FAIL_DELAY
|
|
68 \ GID_MAX
|
|
69 \ GID_MIN
|
|
70 \ KILLCHAR
|
|
71 \ LOGIN_RETRIES
|
|
72 \ LOGIN_TIMEOUT
|
|
73 \ MAX_MEMBERS_PER_GROUP
|
|
74 \ PASS_CHANGE_TRIES
|
|
75 \ PASS_MAX_DAYS
|
|
76 \ PASS_MIN_DAYS
|
|
77 \ PASS_WARN_AGE
|
|
78 \ PASS_MAX_LEN
|
|
79 \ PASS_MIN_LEN
|
|
80 \ SHA_CRYPT_MAX_ROUNDS
|
|
81 \ SHA_CRYPT_MIN_ROUNDS
|
|
82 \ SYS_GID_MAX
|
|
83 \ SYS_GID_MIN
|
|
84 \ SYS_UID_MAX
|
|
85 \ SYS_UID_MIN
|
|
86 \ UID_MAX
|
|
87 \ UID_MIN
|
|
88 \ ULIMIT
|
|
89 \ UMASK
|
|
90 \ nextgroup=@logindefsNumber skipwhite
|
375
|
91
|
2662
|
92 syn cluster logindefsNumber contains=
|
|
93 \ logindefsDecimal,
|
|
94 \ logindefsHex,
|
|
95 \ logindefsOctal,
|
|
96 \ logindefsOctalError
|
|
97
|
|
98 syn match logindefsDecimal contained '\<\d\+\>'
|
|
99
|
|
100 syn match logindefsHex contained display '\<0x\x\+\>'
|
|
101
|
|
102 syn match logindefsOctal contained display '\<0\o\+\>'
|
|
103 \ contains=logindefsOctalZero
|
|
104 syn match logindefsOctalZero contained display '\<0'
|
|
105
|
|
106 syn match logindefsOctalError contained display '\<0\o*[89]\d*\>'
|
375
|
107
|
2662
|
108 syn keyword logindefsPathKeyword contained
|
|
109 \ ENVIRON_FILE
|
|
110 \ FAKE_SHELL
|
|
111 \ FTMP_FILE
|
|
112 \ HUSHLOGIN_FILE
|
|
113 \ ISSUE_FILE
|
|
114 \ MAIL_DIR
|
|
115 \ MAIL_FILE
|
|
116 \ NOLOGINS_FILE
|
|
117 \ SULOG_FILE
|
|
118 \ TTYTYPE_FILE
|
|
119 \ nextgroup=logindefsPath skipwhite
|
375
|
120
|
2662
|
121 syn match logindefsPath contained '[[:graph:]]\+'
|
|
122
|
|
123 syn keyword logindefsPathsKeyword contained
|
|
124 \ CONSOLE
|
|
125 \ ENV_PATH
|
|
126 \ ENV_SUPATH
|
|
127 \ MOTD_FILE
|
|
128 \ nextgroup=logindefsPaths skipwhite
|
375
|
129
|
2662
|
130 syn match logindefsPaths contained '[^:]\+'
|
|
131 \ nextgroup=logindefsPathDelim
|
|
132
|
|
133 syn match logindefsPathDelim contained ':' nextgroup=logindefsPaths
|
375
|
134
|
2662
|
135 syn keyword logindefsStringKeyword contained
|
|
136 \ CHFN_RESTRICT
|
|
137 \ CONSOLE_GROUPS
|
|
138 \ ENV_HZ
|
|
139 \ ENV_TZ
|
|
140 \ LOGIN_STRING
|
|
141 \ SU_NAME
|
|
142 \ TTYGROUP
|
|
143 \ TTYPERM
|
|
144 \ USERDEL_CMD
|
|
145 \ nextgroup=logindefsString skipwhite
|
|
146
|
|
147 syn match logindefsString contained '[[:graph:]]\+'
|
375
|
148
|
2662
|
149 hi def link logindefsComment Comment
|
|
150 hi def link logindefsTodo Todo
|
|
151 hi def link logindefsKeyword Keyword
|
|
152 hi def link logindefsBooleanKeyword logindefsKeyword
|
|
153 hi def link logindefsEncryptKeyword logindefsKeyword
|
|
154 hi def link logindefsNumberKeyword logindefsKeyword
|
|
155 hi def link logindefsPathKeyword logindefsKeyword
|
|
156 hi def link logindefsPathsKeyword logindefsKeyword
|
|
157 hi def link logindefsStringKeyword logindefsKeyword
|
|
158 hi def link logindefsBoolean Boolean
|
|
159 hi def link logindefsEncryptMethod Type
|
|
160 hi def link logindefsNumber Number
|
|
161 hi def link logindefsDecimal logindefsNumber
|
|
162 hi def link logindefsHex logindefsNumber
|
|
163 hi def link logindefsOctal logindefsNumber
|
|
164 hi def link logindefsOctalZero PreProc
|
|
165 hi def link logindefsOctalError Error
|
|
166 hi def link logindefsPath String
|
|
167 hi def link logindefsPaths logindefsPath
|
|
168 hi def link logindefsPathDelim Delimiter
|
|
169 hi def link logindefsString String
|
375
|
170
|
|
171 let b:current_syntax = "logindefs"
|
|
172
|
|
173 let &cpo = s:cpo_save
|
|
174 unlet s:cpo_save
|