home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / runtime / dos / syntax / ldapconf.vim < prev    next >
Encoding:
Text File  |  2010-08-15  |  13.3 KB  |  339 lines

  1. " Vim syntax file
  2. " Language:         ldap.conf(5) configuration file.
  3. " Maintainer:       Nikolai Weibull <now@bitwi.se>
  4. " Latest Revision:  2006-12-11
  5.  
  6. if exists("b:current_syntax")
  7.   finish
  8. endif
  9.  
  10. let s:cpo_save = &cpo
  11. set cpo&vim
  12.  
  13. syn keyword ldapconfTodo          contained TODO FIXME XXX NOTE
  14.  
  15. syn region  ldapconfComment       display oneline start='^\s*#' end='$'
  16.       \                           contains=ldapconfTodo,
  17.       \                                    @Spell
  18.  
  19. syn match   ldapconfBegin         display '^'
  20.       \                           nextgroup=ldapconfOption,
  21.       \                                     ldapconfDeprOption,
  22.       \                                     ldapconfComment
  23.  
  24. syn case    ignore
  25.  
  26. syn keyword ldapconfOption        contained URI 
  27.       \                           nextgroup=ldapconfURI
  28.       \                           skipwhite
  29.  
  30. syn keyword ldapconfOption        contained
  31.       \                           BASE
  32.       \                           BINDDN
  33.       \                           nextgroup=ldapconfDNAttrType
  34.       \                           skipwhite
  35.  
  36. syn keyword ldapconfDeprOption    contained 
  37.       \                           HOST
  38.       \                           nextgroup=ldapconfHost
  39.       \                           skipwhite
  40.  
  41. syn keyword ldapconfDeprOption    contained
  42.       \                           PORT
  43.       \                           nextgroup=ldapconfPort
  44.       \                           skipwhite
  45.  
  46. syn keyword ldapconfOption        contained
  47.       \                           REFERRALS
  48.       \                           nextgroup=ldapconfBoolean
  49.       \                           skipwhite
  50.  
  51. syn keyword ldapconfOption        contained
  52.       \                           SIZELIMIT
  53.       \                           TIMELIMIT
  54.       \                           nextgroup=ldapconfInteger
  55.       \                           skipwhite
  56.  
  57. syn keyword ldapconfOption        contained
  58.       \                           DEREF
  59.       \                           nextgroup=ldapconfDerefWhen
  60.       \                           skipwhite
  61.  
  62. syn keyword ldapconfOption        contained
  63.       \                           SASL_MECH
  64.       \                           nextgroup=ldapconfSASLMechanism
  65.       \                           skipwhite
  66.  
  67. syn keyword ldapconfOption        contained
  68.       \                           SASL_REALM
  69.       \                           nextgroup=ldapconfSASLRealm
  70.       \                           skipwhite
  71.  
  72. syn keyword ldapconfOption        contained
  73.       \                           SASL_AUTHCID
  74.       \                           SASL_AUTHZID
  75.       \                           nextgroup=ldapconfSASLAuthID
  76.       \                           skipwhite
  77.  
  78. syn keyword ldapconfOption        contained
  79.       \                           SASL_SECPROPS
  80.       \                           nextgroup=ldapconfSASLSecProps
  81.       \                           skipwhite
  82.  
  83. syn keyword ldapconfOption        contained
  84.       \                           TLS_CACERT
  85.       \                           TLS_CERT
  86.       \                           TLS_KEY
  87.       \                           TLS_RANDFILE
  88.       \                           nextgroup=ldapconfFilename
  89.       \                           skipwhite
  90.  
  91. syn keyword ldapconfOption        contained
  92.       \                           TLS_CACERTDIR
  93.       \                           nextgroup=ldapconfPath
  94.       \                           skipwhite
  95.  
  96. syn keyword ldapconfOption        contained
  97.       \                           TLS_CIPHER_SUITE
  98.       \                           nextgroup=@ldapconfTLSCipher
  99.       \                           skipwhite
  100.  
  101. syn keyword ldapconfOption        contained
  102.       \                           TLS_REQCERT
  103.       \                           nextgroup=ldapconfTLSCertCheck
  104.       \                           skipwhite
  105.  
  106. syn keyword ldapconfOption        contained
  107.       \                           TLS_CRLCHECK
  108.       \                           nextgroup=ldapconfTLSCRLCheck
  109.       \                           skipwhite
  110.  
  111. syn case    match
  112.  
  113. syn 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.
  120. syn match   ldapconfDNAttrType    contained display
  121.       \                           '\a[a-zA-Z0-9-]\+\|\d\+\%(\.\d\+\)*'
  122.       \                           nextgroup=ldapconfDNAttrTypeEq
  123.  
  124. syn match   ldapconfDNAttrTypeEq  contained display
  125.       \                           '='
  126.       \                           nextgroup=ldapconfDNAttrValue
  127.  
  128. syn match   ldapconfDNAttrValue   contained display
  129.       \                           '\%([^,=+<>#;\\"]\|\\\%([,=+<>#;\\"]\|\x\x\)\)*\|#\%(\x\x\)\+\|"\%([^\\"]\|\\\%([,=+<>#;\\"]\|\x\x\)\)*"'
  130.       \                           nextgroup=ldapconfDNSeparator
  131.  
  132. syn match   ldapconfDNSeparator   contained display
  133.       \                           '[+,]'
  134.       \                           nextgroup=ldapconfDNAttrType
  135.  
  136. syn match   ldapconfHost          contained display
  137.       \                           '[^[:space:]:]\+\%(:\d\+\)\='
  138.       \                           nextgroup=ldapconfHost
  139.       \                           skipwhite
  140.  
  141. syn match   ldapconfPort          contained display
  142.       \                           '\d\+'
  143.  
  144. syn keyword ldapconfBoolean       contained
  145.       \                           on
  146.       \                           true
  147.       \                           yes
  148.       \                           off
  149.       \                           false
  150.       \                           no
  151.  
  152. syn match   ldapconfInteger       contained display
  153.       \                           '\d\+'
  154.  
  155. syn keyword ldapconfDerefWhen     contained
  156.       \                           never
  157.       \                           searching
  158.       \                           finding
  159.       \                           always
  160.  
  161. " Taken from http://www.iana.org/assignments/sasl-mechanisms.
  162. syn 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.  
  176. syn 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.
  181. syn match   ldapconfSASLRealm     contained display
  182.       \                           '\S\+'
  183.  
  184. syn match   ldapconfSASLAuthID    contained display
  185.       \                           '\S\+'
  186.  
  187. syn keyword ldapconfSASLSecProps  contained
  188.       \                           none
  189.       \                           noplain
  190.       \                           noactive
  191.       \                           nodict
  192.       \                           noanonymous
  193.       \                           forwardsec
  194.       \                           passcred
  195.       \                           nextgroup=ldapconfSASLSecPSep
  196.  
  197. syn keyword ldapconfSASLSecProps  contained
  198.       \                           minssf
  199.       \                           maxssf
  200.       \                           maxbufsize
  201.       \                           nextgroup=ldapconfSASLSecPEq
  202.  
  203. syn match   ldapconfSASLSecPEq    contained display
  204.       \                           '='
  205.       \                           nextgroup=ldapconfSASLSecFactor
  206.  
  207. syn match   ldapconfSASLSecFactor contained display
  208.       \                           '\d\+'
  209.       \                           nextgroup=ldapconfSASLSecPSep
  210.  
  211. syn match   ldapconfSASLSecPSep   contained display
  212.       \                           ','
  213.       \                           nextgroup=ldapconfSASLSecProps
  214.  
  215. syn match   ldapconfFilename      contained display
  216.       \                           '.\+'
  217.  
  218. syn match   ldapconfPath          contained display
  219.       \                           '.\+'
  220.  
  221. " Defined in openssl-ciphers(1).
  222. " TODO: Should we include the stuff under CIPHER SUITE NAMES?
  223. syn cluster ldapconfTLSCipher     contains=ldapconfTLSCipherOp,
  224.       \                                    ldapconfTLSCipherName,
  225.       \                                    ldapconfTLSCipherSort
  226.  
  227. syn match   ldapconfTLSCipherOp   contained display
  228.       \                           '[+!-]'
  229.       \                           nextgroup=ldapconfTLSCipherName
  230.  
  231. syn 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.  
  276. syn match   ldapconfTLSCipherSort contained display
  277.       \                           '@STRENGTH'
  278.       \                           nextgroup=ldapconfTLSCipherSep
  279.  
  280. syn match   ldapconfTLSCipherSep  contained display
  281.       \                           '[:, ]'
  282.       \                           nextgroup=@ldapconfTLSCipher
  283.  
  284. syn keyword ldapconfTLSCertCheck  contained
  285.       \                           never
  286.       \                           allow
  287.       \                           try
  288.       \                           demand
  289.       \                           hard
  290.  
  291. syn keyword ldapconfTLSCRLCheck   contained
  292.       \                           none
  293.       \                           peer
  294.       \                           all
  295.  
  296. hi def link ldapconfTodo          Todo
  297. hi def link ldapconfComment       Comment
  298. hi def link ldapconfOption        Keyword
  299. hi def link ldapconfDeprOption    Error
  300. hi def link ldapconfString        String
  301. hi def link ldapconfURI           ldapconfString
  302. hi def link ldapconfDNAttrType    Identifier
  303. hi def link ldapconfOperator      Operator
  304. hi def link ldapconfEq            ldapconfOperator
  305. hi def link ldapconfDNAttrTypeEq  ldapconfEq
  306. hi def link ldapconfValue         ldapconfString
  307. hi def link ldapconfDNAttrValue   ldapconfValue
  308. hi def link ldapconfSeparator     ldapconfOperator
  309. hi def link ldapconfDNSeparator   ldapconfSeparator
  310. hi def link ldapconfHost          ldapconfURI
  311. hi def link ldapconfNumber        Number
  312. hi def link ldapconfPort          ldapconfNumber
  313. hi def link ldapconfBoolean       Boolean
  314. hi def link ldapconfInteger       ldapconfNumber
  315. hi def link ldapconfType          Type
  316. hi def link ldapconfDerefWhen     ldapconfType
  317. hi def link ldapconfDefine        Define
  318. hi def link ldapconfSASLMechanism ldapconfDefine
  319. hi def link ldapconfSASLRealm     ldapconfURI
  320. hi def link ldapconfSASLAuthID    ldapconfValue
  321. hi def link ldapconfSASLSecProps  ldapconfType
  322. hi def link ldapconfSASLSecPEq    ldapconfEq
  323. hi def link ldapconfSASLSecFactor ldapconfNumber
  324. hi def link ldapconfSASLSecPSep   ldapconfSeparator
  325. hi def link ldapconfFilename      ldapconfString
  326. hi def link ldapconfPath          ldapconfFilename
  327. hi def link ldapconfTLSCipherOp   ldapconfOperator
  328. hi def link ldapconfTLSCipherName ldapconfDefine
  329. hi def link ldapconfSpecial       Special
  330. hi def link ldapconfTLSCipherSort ldapconfSpecial
  331. hi def link ldapconfTLSCipherSep  ldapconfSeparator
  332. hi def link ldapconfTLSCertCheck  ldapconfType
  333. hi def link ldapconfTLSCRLCheck   ldapconfType
  334.  
  335. let b:current_syntax = "ldapconf"
  336.  
  337. let &cpo = s:cpo_save
  338. unlet s:cpo_save
  339.