From f2bb8e8d62379d4e740fc39dce7dbe820487a6a9 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Sun, 22 Aug 2021 09:30:38 +0100 Subject: vi: skip permission check on .exrc POSIX requires that the .exrc file is only writable by its owner. Our bogus permissions can't confirm this so just skip the test. --- editors/vi.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'editors/vi.c') diff --git a/editors/vi.c b/editors/vi.c index c791a32e1..a0a046272 100644 --- a/editors/vi.c +++ b/editors/vi.c @@ -4999,7 +4999,11 @@ int vi_main(int argc, char **argv) // .exrc must belong to and only be writable by user if (stat(exrc, &st) == 0) { +# if !ENABLE_PLATFORM_MINGW32 if ((st.st_mode & (S_IWGRP|S_IWOTH)) == 0 +# else + if (1 +# endif && st.st_uid == getuid() ) { cmds = xmalloc_open_read_close(exrc, NULL); -- cgit v1.2.3-55-g6feb