[vim/vim] Problem: backupcopy=auto writes in place with a restrictive umask (PR #21137)

3 views
Skip to first unread message

dwivedipranav-dev

unread,
Aug 23, 2026, 8:18:11 PM (2 days ago) Aug 23
to vim/vim, Subscribed

The 'backupcopy' auto probe compares the probe file mode to the original
without trying to set the mode. With umask 0077, open(..., 0644) creates
0600, the check fails, and Vim overwrites the original inode.
This tries fchmod() (or mch_setperm()) after fchown().
A test in test_writefile.vim asserts the inode changes and mode stays 0644.
Related: https://redhat.atlassian.net/browse/RHEL-122841


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/21137

Commit Summary

  • 8f2c5e4 Problem: backupcopy=auto overwrites a file in place when umask is restrictive.

File Changes

(2 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21137@github.com>

dwivedipranav-dev

unread,
Aug 23, 2026, 9:37:32 PM (2 days ago) Aug 23
to vim/vim, Subscribed
dwivedipranav-dev left a comment (vim/vim#21137)

Thanks, applied. There is now a single blank line between the tests and before the modeline.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21137/c5389724370@github.com>

Christian Brabandt

unread,
3:44 PM (3 hours ago) 3:44 PM
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#21137)

thanks


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21137/c5415787424@github.com>

Reply all
Reply to author
Forward
0 new messages