From 36ee284f555161d894c58cd2f5f82834b428019f Mon Sep 17 00:00:00 2001 From: wangjiang Date: Fri, 24 Mar 2023 09:36:22 +0800 Subject: [PATCH] vim reads /etc/vimrc at startup --- backport-vim-7.0-rclocation.patch | 31 +++++++++++++++++++++++++++++++ vim.spec | 9 ++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 backport-vim-7.0-rclocation.patch diff --git a/backport-vim-7.0-rclocation.patch b/backport-vim-7.0-rclocation.patch new file mode 100644 index 0000000..00b3fc0 --- /dev/null +++ b/backport-vim-7.0-rclocation.patch @@ -0,0 +1,31 @@ +From 54a4d7d5afe1157778223c9c97563b115b9341bc Mon Sep 17 00:00:00 2001 +From: Zdenek Dohnal +Date: 2003-08-04 15:38:05.000000000 +0200 +Subject: [PATCH] vim-7.0-rclocation.patch + +new /usr/share/vim/{vimrc,virc} symlinks are created forloading /etc/{vimrc,virc}. +New symlinks point to original files in /etc. +--- + src/os_unix.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/os_unix.h b/src/os_unix.h +index 00ae239..a0c9485 100644 +--- a/src/os_unix.h ++++ b/src/os_unix.h +@@ -217,10 +217,10 @@ typedef struct dsc$descriptor DESC; + * Unix system-dependent file names + */ + #ifndef SYS_VIMRC_FILE +-# define SYS_VIMRC_FILE "$VIM/vimrc" ++# define SYS_VIMRC_FILE "/etc/vimrc" + #endif + #ifndef SYS_GVIMRC_FILE +-# define SYS_GVIMRC_FILE "$VIM/gvimrc" ++# define SYS_GVIMRC_FILE "/etc/gvimrc" + #endif + #ifndef DFLT_HELPFILE + # define DFLT_HELPFILE "$VIMRUNTIME/doc/help.txt" +-- +2.27.0 + diff --git a/vim.spec b/vim.spec index 2ec6324..a280a68 100644 --- a/vim.spec +++ b/vim.spec @@ -12,7 +12,7 @@ Name: vim Epoch: 2 Version: 9.0 -Release: 11 +Release: 12 Summary: Vim is a highly configurable text editor for efficiently creating and changing any kind of text. License: Vim and MIT URL: http://www.vim.org @@ -92,6 +92,7 @@ Patch6062: backport-patch-9.0.1331-illegal-memory-access-when-using-ball-in Patch6063: backport-CVE-2023-1170.patch Patch6064: backport-CVE-2023-1175.patch Patch6065: backport-CVE-2023-1264.patch +Patch6066: backport-vim-7.0-rclocation.patch Patch9000: bugfix-rm-modify-info-version.patch @@ -499,6 +500,12 @@ LC_ALL=en_US.UTF-8 make -j1 test %{_mandir}/man1/evim.* %changelog +* Fri Mar 24 2023 wangjiang - 2:9.0-12 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:vim reads /etc/vimrc at startup + * Fri Mar 17 2023 wangjiang - 2:9.0-11 - Type:CVE - ID:CVE-2023-1264 -- Gitee