0
0
mirror of https://github.com/vim/vim.git synced 2025-09-07 22:03:36 -04:00

patch 8.2.3604: not all sudoers files are recognized

Problem:    Not all sudoers files are recognized.
Solution:   Add a file pattern. (Doug Kearns, closes #1192)
This commit is contained in:
Bram Moolenaar 2021-11-16 16:38:42 +00:00
parent b1b163efd7
commit c143fa0778
3 changed files with 6 additions and 1 deletions

View File

@ -2307,6 +2307,9 @@ au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]alias
au BufNewFile,BufRead .kshrc* call dist#ft#SetFileTypeSH("ksh")
au BufNewFile,BufRead .profile* call dist#ft#SetFileTypeSH(getline(1))
" Sudoers
au BufNewFile,BufRead */etc/sudoers.d/* call s:StarSetf('sudoers')
" tcsh scripts ending in a star
au BufNewFile,BufRead .tcshrc* call dist#ft#SetFileTypeShell("tcsh")

View File

@ -482,7 +482,7 @@ let s:filename_checks = {
\ 'st': ['file.st'],
\ 'stata': ['file.ado', 'file.do', 'file.imata', 'file.mata'],
\ 'stp': ['file.stp'],
\ 'sudoers': ['any/etc/sudoers', 'sudoers.tmp', '/etc/sudoers'],
\ 'sudoers': ['any/etc/sudoers', 'sudoers.tmp', '/etc/sudoers', 'any/etc/sudoers.d/file'],
\ 'svg': ['file.svg'],
\ 'svn': ['svn-commitfile.tmp', 'svn-commit-file.tmp', 'svn-commit.tmp'],
\ 'swift': ['file.swift'],

View File

@ -757,6 +757,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
3604,
/**/
3603,
/**/