File: ldapconf.vim

package info (click to toggle)
vim 2%3A7.4.488-7%2Bdeb8u3
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 49,660 kB
  • ctags: 31,441
  • sloc: ansic: 309,686; cpp: 4,068; makefile: 3,283; perl: 1,175; awk: 715; sh: 695; xml: 508; lisp: 501; cs: 458; asm: 114; python: 39; csh: 6
file content (338 lines) | stat: -rw-r--r-- 13,290 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
" Vim syntax file
" Language:         ldap.conf(5) configuration file.
" Maintainer:       Nikolai Weibull <now@bitwi.se>
" Latest Revision:  2006-12-11

if exists("b:current_syntax")
  finish
endif

let s:cpo_save = &cpo
set cpo&vim

syn keyword ldapconfTodo          contained TODO FIXME XXX NOTE

syn region  ldapconfComment       display oneline start='^\s*#' end='$'
      \                           contains=ldapconfTodo,
      \                                    @Spell

syn match   ldapconfBegin         display '^'
      \                           nextgroup=ldapconfOption,
      \                                     ldapconfDeprOption,
      \                                     ldapconfComment

syn case    ignore

syn keyword ldapconfOption        contained URI 
      \                           nextgroup=ldapconfURI
      \                           skipwhite

syn keyword ldapconfOption        contained
      \                           BASE
      \                           BINDDN
      \                           nextgroup=ldapconfDNAttrType
      \                           skipwhite

syn keyword ldapconfDeprOption    contained 
      \                           HOST
      \                           nextgroup=ldapconfHost
      \                           skipwhite

syn keyword ldapconfDeprOption    contained
      \                           PORT
      \                           nextgroup=ldapconfPort
      \                           skipwhite

syn keyword ldapconfOption        contained
      \                           REFERRALS
      \                           nextgroup=ldapconfBoolean
      \                           skipwhite

syn keyword ldapconfOption        contained
      \                           SIZELIMIT
      \                           TIMELIMIT
      \                           nextgroup=ldapconfInteger
      \                           skipwhite

syn keyword ldapconfOption        contained
      \                           DEREF
      \                           nextgroup=ldapconfDerefWhen
      \                           skipwhite

syn keyword ldapconfOption        contained
      \                           SASL_MECH
      \                           nextgroup=ldapconfSASLMechanism
      \                           skipwhite

syn keyword ldapconfOption        contained
      \                           SASL_REALM
      \                           nextgroup=ldapconfSASLRealm
      \                           skipwhite

syn keyword ldapconfOption        contained
      \                           SASL_AUTHCID
      \                           SASL_AUTHZID
      \                           nextgroup=ldapconfSASLAuthID
      \                           skipwhite

syn keyword ldapconfOption        contained
      \                           SASL_SECPROPS
      \                           nextgroup=ldapconfSASLSecProps
      \                           skipwhite

syn keyword ldapconfOption        contained
      \                           TLS_CACERT
      \                           TLS_CERT
      \                           TLS_KEY
      \                           TLS_RANDFILE
      \                           nextgroup=ldapconfFilename
      \                           skipwhite

syn keyword ldapconfOption        contained
      \                           TLS_CACERTDIR
      \                           nextgroup=ldapconfPath
      \                           skipwhite

syn keyword ldapconfOption        contained
      \                           TLS_CIPHER_SUITE
      \                           nextgroup=@ldapconfTLSCipher
      \                           skipwhite

syn keyword ldapconfOption        contained
      \                           TLS_REQCERT
      \                           nextgroup=ldapconfTLSCertCheck
      \                           skipwhite

syn keyword ldapconfOption        contained
      \                           TLS_CRLCHECK
      \                           nextgroup=ldapconfTLSCRLCheck
      \                           skipwhite

syn case    match

syn match   ldapconfURI           contained display
      \                           'ldaps\=://[^[:space:]:]\+\%(:\d\+\)\='
      \                           nextgroup=ldapconfURI
      \                           skipwhite

" LDAP Distinguished Names are defined in Section 3 of RFC 2253:
" http://www.ietf.org/rfc/rfc2253.txt.
syn match   ldapconfDNAttrType    contained display
      \                           '\a[a-zA-Z0-9-]\+\|\d\+\%(\.\d\+\)*'
      \                           nextgroup=ldapconfDNAttrTypeEq

syn match   ldapconfDNAttrTypeEq  contained display
      \                           '='
      \                           nextgroup=ldapconfDNAttrValue

syn match   ldapconfDNAttrValue   contained display
      \                           '\%([^,=+<>#;\\"]\|\\\%([,=+<>#;\\"]\|\x\x\)\)*\|#\%(\x\x\)\+\|"\%([^\\"]\|\\\%([,=+<>#;\\"]\|\x\x\)\)*"'
      \                           nextgroup=ldapconfDNSeparator

syn match   ldapconfDNSeparator   contained display
      \                           '[+,]'
      \                           nextgroup=ldapconfDNAttrType

syn match   ldapconfHost          contained display
      \                           '[^[:space:]:]\+\%(:\d\+\)\='
      \                           nextgroup=ldapconfHost
      \                           skipwhite

syn match   ldapconfPort          contained display
      \                           '\d\+'

syn keyword ldapconfBoolean       contained
      \                           on
      \                           true
      \                           yes
      \                           off
      \                           false
      \                           no

syn match   ldapconfInteger       contained display
      \                           '\d\+'

syn keyword ldapconfDerefWhen     contained
      \                           never
      \                           searching
      \                           finding
      \                           always

" Taken from http://www.iana.org/assignments/sasl-mechanisms.
syn keyword ldapconfSASLMechanism contained
      \                           KERBEROS_V4
      \                           GSSAPI
      \                           SKEY
      \                           EXTERNAL
      \                           ANONYMOUS
      \                           OTP
      \                           PLAIN
      \                           SECURID
      \                           NTLM
      \                           NMAS_LOGIN
      \                           NMAS_AUTHEN
      \                           KERBEROS_V5

syn match   ldapconfSASLMechanism contained display
      \                           'CRAM-MD5\|GSS-SPNEGO\|DIGEST-MD5\|9798-[UM]-\%(RSA-SHA1-ENC\|\%(EC\)\=DSA-SHA1\)\|NMAS-SAMBA-AUTH'

" TODO: I have been unable to find a definition for a SASL realm,
" authentication identity, and proxy authorization identity.
syn match   ldapconfSASLRealm     contained display
      \                           '\S\+'

syn match   ldapconfSASLAuthID    contained display
      \                           '\S\+'

syn keyword ldapconfSASLSecProps  contained
      \                           none
      \                           noplain
      \                           noactive
      \                           nodict
      \                           noanonymous
      \                           forwardsec
      \                           passcred
      \                           nextgroup=ldapconfSASLSecPSep

syn keyword ldapconfSASLSecProps  contained
      \                           minssf
      \                           maxssf
      \                           maxbufsize
      \                           nextgroup=ldapconfSASLSecPEq

syn match   ldapconfSASLSecPEq    contained display
      \                           '='
      \                           nextgroup=ldapconfSASLSecFactor

syn match   ldapconfSASLSecFactor contained display
      \                           '\d\+'
      \                           nextgroup=ldapconfSASLSecPSep

syn match   ldapconfSASLSecPSep   contained display
      \                           ','
      \                           nextgroup=ldapconfSASLSecProps

syn match   ldapconfFilename      contained display
      \                           '.\+'

syn match   ldapconfPath          contained display
      \                           '.\+'

" Defined in openssl-ciphers(1).
" TODO: Should we include the stuff under CIPHER SUITE NAMES?
syn cluster ldapconfTLSCipher     contains=ldapconfTLSCipherOp,
      \                                    ldapconfTLSCipherName,
      \                                    ldapconfTLSCipherSort

syn match   ldapconfTLSCipherOp   contained display
      \                           '[+!-]'
      \                           nextgroup=ldapconfTLSCipherName

syn keyword ldapconfTLSCipherName contained
      \                           DEFAULT
      \                           COMPLEMENTOFDEFAULT
      \                           ALL
      \                           COMPLEMENTOFALL
      \                           HIGH
      \                           MEDIUM
      \                           LOW
      \                           EXP
      \                           EXPORT
      \                           EXPORT40
      \                           EXPORT56
      \                           eNULL
      \                           NULL
      \                           aNULL
      \                           kRSA
      \                           RSA
      \                           kEDH
      \                           kDHr
      \                           kDHd
      \                           aRSA
      \                           aDSS
      \                           DSS
      \                           aDH
      \                           kFZA
      \                           aFZA
      \                           eFZA
      \                           FZA
      \                           TLSv1
      \                           SSLv3
      \                           SSLv2
      \                           DH
      \                           ADH
      \                           AES
      \                           3DES
      \                           DES
      \                           RC4
      \                           RC2
      \                           IDEA
      \                           MD5
      \                           SHA1
      \                           SHA
      \                           Camellia
      \                           nextgroup=ldapconfTLSCipherSep

syn match   ldapconfTLSCipherSort contained display
      \                           '@STRENGTH'
      \                           nextgroup=ldapconfTLSCipherSep

syn match   ldapconfTLSCipherSep  contained display
      \                           '[:, ]'
      \                           nextgroup=@ldapconfTLSCipher

syn keyword ldapconfTLSCertCheck  contained
      \                           never
      \                           allow
      \                           try
      \                           demand
      \                           hard

syn keyword ldapconfTLSCRLCheck   contained
      \                           none
      \                           peer
      \                           all

hi def link ldapconfTodo          Todo
hi def link ldapconfComment       Comment
hi def link ldapconfOption        Keyword
hi def link ldapconfDeprOption    Error
hi def link ldapconfString        String
hi def link ldapconfURI           ldapconfString
hi def link ldapconfDNAttrType    Identifier
hi def link ldapconfOperator      Operator
hi def link ldapconfEq            ldapconfOperator
hi def link ldapconfDNAttrTypeEq  ldapconfEq
hi def link ldapconfValue         ldapconfString
hi def link ldapconfDNAttrValue   ldapconfValue
hi def link ldapconfSeparator     ldapconfOperator
hi def link ldapconfDNSeparator   ldapconfSeparator
hi def link ldapconfHost          ldapconfURI
hi def link ldapconfNumber        Number
hi def link ldapconfPort          ldapconfNumber
hi def link ldapconfBoolean       Boolean
hi def link ldapconfInteger       ldapconfNumber
hi def link ldapconfType          Type
hi def link ldapconfDerefWhen     ldapconfType
hi def link ldapconfDefine        Define
hi def link ldapconfSASLMechanism ldapconfDefine
hi def link ldapconfSASLRealm     ldapconfURI
hi def link ldapconfSASLAuthID    ldapconfValue
hi def link ldapconfSASLSecProps  ldapconfType
hi def link ldapconfSASLSecPEq    ldapconfEq
hi def link ldapconfSASLSecFactor ldapconfNumber
hi def link ldapconfSASLSecPSep   ldapconfSeparator
hi def link ldapconfFilename      ldapconfString
hi def link ldapconfPath          ldapconfFilename
hi def link ldapconfTLSCipherOp   ldapconfOperator
hi def link ldapconfTLSCipherName ldapconfDefine
hi def link ldapconfSpecial       Special
hi def link ldapconfTLSCipherSort ldapconfSpecial
hi def link ldapconfTLSCipherSep  ldapconfSeparator
hi def link ldapconfTLSCertCheck  ldapconfType
hi def link ldapconfTLSCRLCheck   ldapconfType

let b:current_syntax = "ldapconf"

let &cpo = s:cpo_save
unlet s:cpo_save