Skip to content

Commit

Permalink
runtime(logindefs): update syntax with new keywords
Browse files Browse the repository at this point in the history
* add keywords
* enforce octal format for permissions

closes: #15222

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
  • Loading branch information
e-kwsm authored and chrisbra committed Jul 12, 2024
1 parent 8a7563b commit 57f7d75
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions runtime/syntax/logindefs.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
" Vim syntax file
" Vim syntax file for login.defs(5)
" Language: login.defs(5) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2010-11-29
" 2024 Jul 12 by Vim Project: Update keywords

if exists("b:current_syntax")
finish
Expand Down Expand Up @@ -35,6 +36,8 @@ syn keyword logindefsBooleanKeyword contained
\ CREATE_HOME
\ DEFAULT_HOME
\ FAILLOG_ENAB
\ FORCE_SHADOW
\ GRANT_AUX_GROUP_SUBIDS
\ LASTLOG_ENAB
\ LOG_OK_LOGINS
\ LOG_UNKFAIL_ENAB
Expand All @@ -54,15 +57,20 @@ syn keyword logindefsBoolean contained yes no

syn keyword logindefsEncryptKeyword contained
\ ENCRYPT_METHOD
\ HMAC_CRYPTO_ALGO
\ nextgroup=logindefsEncryptMethod skipwhite

syn keyword logindefsEncryptMethod contained
\ BCRYPT
\ DES
\ MD5
\ SHA256
\ SHA512
\ YESCRYPT

syn keyword logindefsNumberKeyword contained
\ BCRYPT_MAX_ROUNDS
\ BCRYPT_MIN_ROUNDS
\ ERASECHAR
\ FAIL_DELAY
\ GID_MAX
Expand All @@ -79,16 +87,28 @@ syn keyword logindefsNumberKeyword contained
\ PASS_MIN_LEN
\ SHA_CRYPT_MAX_ROUNDS
\ SHA_CRYPT_MIN_ROUNDS
\ SUB_GID_COUNT
\ SUB_GID_MAX
\ SUB_GID_MIN
\ SUB_UID_COUNT
\ SUB_UID_MAX
\ SUB_UID_MIN
\ SYS_GID_MAX
\ SYS_GID_MIN
\ SYS_UID_MAX
\ SYS_UID_MIN
\ UID_MAX
\ UID_MIN
\ ULIMIT
\ UMASK
\ YESCRYPT_COST_FACTOR
\ nextgroup=@logindefsNumber skipwhite

syn keyword logindefsNumberKeyword contained
\ HOME_MODE
\ TTYPERM
\ UMASK
\ nextgroup=logindefsOctal,logindefsOctalError skipwhite

syn cluster logindefsNumber contains=
\ logindefsDecimal,
\ logindefsHex,
Expand All @@ -114,6 +134,7 @@ syn keyword logindefsPathKeyword contained
\ MAIL_DIR
\ MAIL_FILE
\ NOLOGINS_FILE
\ NONEXISTENT
\ SULOG_FILE
\ TTYTYPE_FILE
\ nextgroup=logindefsPath skipwhite
Expand All @@ -138,9 +159,9 @@ syn keyword logindefsStringKeyword contained
\ ENV_HZ
\ ENV_TZ
\ LOGIN_STRING
\ PREVENT_NO_AUTH
\ SU_NAME
\ TTYGROUP
\ TTYPERM
\ USERDEL_CMD
\ nextgroup=logindefsString skipwhite

Expand Down

0 comments on commit 57f7d75

Please sign in to comment.