1" Vim syntax file 2" Language: ldap.conf(5) configuration file. 3" Maintainer: Nikolai Weibull <[email protected]> 4" Latest Revision: 2006-12-11 5 6if exists("b:current_syntax") 7 finish 8endif 9 10let s:cpo_save = &cpo 11set cpo&vim 12 13syn keyword ldapconfTodo contained TODO FIXME XXX NOTE 14 15syn region ldapconfComment display oneline start='^\s*#' end='$' 16 \ contains=ldapconfTodo, 17 \ @Spell 18 19syn match ldapconfBegin display '^' 20 \ nextgroup=ldapconfOption, 21 \ ldapconfDeprOption, 22 \ ldapconfComment 23 24syn case ignore 25 26syn keyword ldapconfOption contained URI 27 \ nextgroup=ldapconfURI 28 \ skipwhite 29 30syn keyword ldapconfOption contained 31 \ BASE 32 \ BINDDN 33 \ nextgroup=ldapconfDNAttrType 34 \ skipwhite 35 36syn keyword ldapconfDeprOption contained 37 \ HOST 38 \ nextgroup=ldapconfHost 39 \ skipwhite 40 41syn keyword ldapconfDeprOption contained 42 \ PORT 43 \ nextgroup=ldapconfPort 44 \ skipwhite 45 46syn keyword ldapconfOption contained 47 \ REFERRALS 48 \ nextgroup=ldapconfBoolean 49 \ skipwhite 50 51syn keyword ldapconfOption contained 52 \ SIZELIMIT 53 \ TIMELIMIT 54 \ nextgroup=ldapconfInteger 55 \ skipwhite 56 57syn keyword ldapconfOption contained 58 \ DEREF 59 \ nextgroup=ldapconfDerefWhen 60 \ skipwhite 61 62syn keyword ldapconfOption contained 63 \ SASL_MECH 64 \ nextgroup=ldapconfSASLMechanism 65 \ skipwhite 66 67syn keyword ldapconfOption contained 68 \ SASL_REALM 69 \ nextgroup=ldapconfSASLRealm 70 \ skipwhite 71 72syn keyword ldapconfOption contained 73 \ SASL_AUTHCID 74 \ SASL_AUTHZID 75 \ nextgroup=ldapconfSASLAuthID 76 \ skipwhite 77 78syn keyword ldapconfOption contained 79 \ SASL_SECPROPS 80 \ nextgroup=ldapconfSASLSecProps 81 \ skipwhite 82 83syn keyword ldapconfOption contained 84 \ TLS_CACERT 85 \ TLS_CERT 86 \ TLS_KEY 87 \ TLS_RANDFILE 88 \ nextgroup=ldapconfFilename 89 \ skipwhite 90 91syn keyword ldapconfOption contained 92 \ TLS_CACERTDIR 93 \ nextgroup=ldapconfPath 94 \ skipwhite 95 96syn keyword ldapconfOption contained 97 \ TLS_CIPHER_SUITE 98 \ nextgroup=@ldapconfTLSCipher 99 \ skipwhite 100 101syn keyword ldapconfOption contained 102 \ TLS_REQCERT 103 \ nextgroup=ldapconfTLSCertCheck 104 \ skipwhite 105 106syn keyword ldapconfOption contained 107 \ TLS_CRLCHECK 108 \ nextgroup=ldapconfTLSCRLCheck 109 \ skipwhite 110 111syn case match 112 113syn match ldapconfURI contained display 114 \ 'ldaps\=://[^[:space:]:]\+\%(:\d\+\)\=' 115 \ nextgroup=ldapconfURI 116 \ skipwhite 117 118" LDAP Distinguished Names are defined in Section 3 of RFC 2253: 119" http://www.ietf.org/rfc/rfc2253.txt. 120syn match ldapconfDNAttrType contained display 121 \ '\a[a-zA-Z0-9-]\+\|\d\+\%(\.\d\+\)*' 122 \ nextgroup=ldapconfDNAttrTypeEq 123 124syn match ldapconfDNAttrTypeEq contained display 125 \ '=' 126 \ nextgroup=ldapconfDNAttrValue 127 128syn match ldapconfDNAttrValue contained display 129 \ '\%([^,=+<>#;\\"]\|\\\%([,=+<>#;\\"]\|\x\x\)\)*\|#\%(\x\x\)\+\|"\%([^\\"]\|\\\%([,=+<>#;\\"]\|\x\x\)\)*"' 130 \ nextgroup=ldapconfDNSeparator 131 132syn match ldapconfDNSeparator contained display 133 \ '[+,]' 134 \ nextgroup=ldapconfDNAttrType 135 136syn match ldapconfHost contained display 137 \ '[^[:space:]:]\+\%(:\d\+\)\=' 138 \ nextgroup=ldapconfHost 139 \ skipwhite 140 141syn match ldapconfPort contained display 142 \ '\d\+' 143 144syn keyword ldapconfBoolean contained 145 \ on 146 \ true 147 \ yes 148 \ off 149 \ false 150 \ no 151 152syn match ldapconfInteger contained display 153 \ '\d\+' 154 155syn keyword ldapconfDerefWhen contained 156 \ never 157 \ searching 158 \ finding 159 \ always 160 161" Taken from http://www.iana.org/assignments/sasl-mechanisms. 162syn keyword ldapconfSASLMechanism contained 163 \ KERBEROS_V4 164 \ GSSAPI 165 \ SKEY 166 \ EXTERNAL 167 \ ANONYMOUS 168 \ OTP 169 \ PLAIN 170 \ SECURID 171 \ NTLM 172 \ NMAS_LOGIN 173 \ NMAS_AUTHEN 174 \ KERBEROS_V5 175 176syn match ldapconfSASLMechanism contained display 177 \ 'CRAM-MD5\|GSS-SPNEGO\|DIGEST-MD5\|9798-[UM]-\%(RSA-SHA1-ENC\|\%(EC\)\=DSA-SHA1\)\|NMAS-SAMBA-AUTH' 178 179" TODO: I have been unable to find a definition for a SASL realm, 180" authentication identity, and proxy authorization identity. 181syn match ldapconfSASLRealm contained display 182 \ '\S\+' 183 184syn match ldapconfSASLAuthID contained display 185 \ '\S\+' 186 187syn keyword ldapconfSASLSecProps contained 188 \ none 189 \ noplain 190 \ noactive 191 \ nodict 192 \ noanonymous 193 \ forwardsec 194 \ passcred 195 \ nextgroup=ldapconfSASLSecPSep 196 197syn keyword ldapconfSASLSecProps contained 198 \ minssf 199 \ maxssf 200 \ maxbufsize 201 \ nextgroup=ldapconfSASLSecPEq 202 203syn match ldapconfSASLSecPEq contained display 204 \ '=' 205 \ nextgroup=ldapconfSASLSecFactor 206 207syn match ldapconfSASLSecFactor contained display 208 \ '\d\+' 209 \ nextgroup=ldapconfSASLSecPSep 210 211syn match ldapconfSASLSecPSep contained display 212 \ ',' 213 \ nextgroup=ldapconfSASLSecProps 214 215syn match ldapconfFilename contained display 216 \ '.\+' 217 218syn match ldapconfPath contained display 219 \ '.\+' 220 221" Defined in openssl-ciphers(1). 222" TODO: Should we include the stuff under CIPHER SUITE NAMES? 223syn cluster ldapconfTLSCipher contains=ldapconfTLSCipherOp, 224 \ ldapconfTLSCipherName, 225 \ ldapconfTLSCipherSort 226 227syn match ldapconfTLSCipherOp contained display 228 \ '[+!-]' 229 \ nextgroup=ldapconfTLSCipherName 230 231syn keyword ldapconfTLSCipherName contained 232 \ DEFAULT 233 \ COMPLEMENTOFDEFAULT 234 \ ALL 235 \ COMPLEMENTOFALL 236 \ HIGH 237 \ MEDIUM 238 \ LOW 239 \ EXP 240 \ EXPORT 241 \ EXPORT40 242 \ EXPORT56 243 \ eNULL 244 \ NULL 245 \ aNULL 246 \ kRSA 247 \ RSA 248 \ kEDH 249 \ kDHr 250 \ kDHd 251 \ aRSA 252 \ aDSS 253 \ DSS 254 \ aDH 255 \ kFZA 256 \ aFZA 257 \ eFZA 258 \ FZA 259 \ TLSv1 260 \ SSLv3 261 \ SSLv2 262 \ DH 263 \ ADH 264 \ AES 265 \ 3DES 266 \ DES 267 \ RC4 268 \ RC2 269 \ IDEA 270 \ MD5 271 \ SHA1 272 \ SHA 273 \ Camellia 274 \ nextgroup=ldapconfTLSCipherSep 275 276syn match ldapconfTLSCipherSort contained display 277 \ '@STRENGTH' 278 \ nextgroup=ldapconfTLSCipherSep 279 280syn match ldapconfTLSCipherSep contained display 281 \ '[:, ]' 282 \ nextgroup=@ldapconfTLSCipher 283 284syn keyword ldapconfTLSCertCheck contained 285 \ never 286 \ allow 287 \ try 288 \ demand 289 \ hard 290 291syn keyword ldapconfTLSCRLCheck contained 292 \ none 293 \ peer 294 \ all 295 296hi def link ldapconfTodo Todo 297hi def link ldapconfComment Comment 298hi def link ldapconfOption Keyword 299hi def link ldapconfDeprOption Error 300hi def link ldapconfString String 301hi def link ldapconfURI ldapconfString 302hi def link ldapconfDNAttrType Identifier 303hi def link ldapconfOperator Operator 304hi def link ldapconfEq ldapconfOperator 305hi def link ldapconfDNAttrTypeEq ldapconfEq 306hi def link ldapconfValue ldapconfString 307hi def link ldapconfDNAttrValue ldapconfValue 308hi def link ldapconfSeparator ldapconfOperator 309hi def link ldapconfDNSeparator ldapconfSeparator 310hi def link ldapconfHost ldapconfURI 311hi def link ldapconfNumber Number 312hi def link ldapconfPort ldapconfNumber 313hi def link ldapconfBoolean Boolean 314hi def link ldapconfInteger ldapconfNumber 315hi def link ldapconfType Type 316hi def link ldapconfDerefWhen ldapconfType 317hi def link ldapconfDefine Define 318hi def link ldapconfSASLMechanism ldapconfDefine 319hi def link ldapconfSASLRealm ldapconfURI 320hi def link ldapconfSASLAuthID ldapconfValue 321hi def link ldapconfSASLSecProps ldapconfType 322hi def link ldapconfSASLSecPEq ldapconfEq 323hi def link ldapconfSASLSecFactor ldapconfNumber 324hi def link ldapconfSASLSecPSep ldapconfSeparator 325hi def link ldapconfFilename ldapconfString 326hi def link ldapconfPath ldapconfFilename 327hi def link ldapconfTLSCipherOp ldapconfOperator 328hi def link ldapconfTLSCipherName ldapconfDefine 329hi def link ldapconfSpecial Special 330hi def link ldapconfTLSCipherSort ldapconfSpecial 331hi def link ldapconfTLSCipherSep ldapconfSeparator 332hi def link ldapconfTLSCertCheck ldapconfType 333hi def link ldapconfTLSCRLCheck ldapconfType 334 335let b:current_syntax = "ldapconf" 336 337let &cpo = s:cpo_save 338unlet s:cpo_save 339