Skip to content

lines added to /usr/share/vim/vimfiles/archlinux.vim?

I found this was just added to /usr/share/vim/vimfiles/archlinux.vim

  " Move the swap file location to protect against CVE-2017-1000382
  silent !install -d -m 700 ~/.vim/swap/ 2>&1 > /dev/null

shelling out while vim is loading does not seem like a great idea. https://www.reddit.com/r/vim/comments/805zvt/exiting_vim_leaves_a_huge_gap_in_my_terminal/

It is particularly annoying because one cannot override archlinux.vim.

Does anyone know who added this and how it addresses the CVE?

20 points8 comments
Open on Reddit
About this post
Posted
Archived
Score
20 · 100% up
Kind
Text
ID
807wuy

Author

1
posts
69
comments
0
media
View profile

8 comments

Is this why vim started complaining at me starting yesterday or so?

2 points

not sure, what was it complaining about?

1 points

E303: Unable to open swap file for ".zshrc", recovery impossible

It does this for any file I open with vim, and there are no vim swap files in the pwd.

EDIT: Except for ~/.swp, but removing doesn't change anything.

EDIT 2: Turns out root somehow became the owner of ~/.vim/swap; vim running with user permissions could never get it. Solution was just to remove/rename the file.

[username@hostname ~] > mv ~/.vim/swap ~/.vim/swap.old
[username@hostname ~] > vim .vimrc # test opening with no problems
[username@hostname ~] > ls ~/.vim
total 0
drwxr-xr-x 1 username username   12 Jan 31 01:12 after
drwxr-xr-x 1 username username  240 Jan 30 15:49 plugged
drwx------ 1 username username    0 Feb 26 01:11 swap
drwx------ 1 root     root        0 Feb 23 23:15 swap.old
drwxr-xr-x 1 username username   54 Jan 12 01:37 syntax
3 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.