Age | Commit message (Collapse) | Author |
|
Problem: problem with writing extended attributes on failure
Solution: Change return type to ssize_t and check listxattr's return
value correctly on failure (Paul Tagliamonte)
The existing logic will return when the listxattr call returns with the
errno set to ENOTSUP (or a size of 0 bytes), without checking to see if
listxattr actually failed. listxattr can fail with at least E2BIG,
ENOTSUP, ERANGE, or anything that `stat(2)` can fail with (in my case;
ENOENT from stat).
The returned size is stored to a size_t, but the return type is a
ssize_t. On failure, listxattr returns -1, which will get translated to
size_t's MAX. If the listxattr call failed with anything other than
ENOTSUP, this triggers a request for size_t MAX bytes.
This means that, if the listxattr call fails with anything other than
ENOTSUP on save, vim will error with
`E342: Out of memory! (allocating 18446744073709551615 bytes)`
(keen observers will note 18446744073709551615 is 0xffffffffffffffff)
In reality, this is likely masking a different (usually filesystem?)
error -- but at least it's an error being pushed to the user now, and we
don't try to allocate size_t MAX bytes.
I've opted to change the type that we store listxattr to from size_t to
ssize_t, to match listxattr(2)'s signature, and to check for the -1
return value. Additionally, I've removed the errno check -- if we get a
listxattr failure for any reason, we may as well bail without trying;
it's not like we can even recover.
closes: #14169
Signed-off-by: Paul Tagliamonte <paultag@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: No Wayland support
Solution: Add Wayland UI support
(lilydjwg)
closes: #9639
Signed-off-by: lilydjwg <lilydjwg@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: is*() and to*() function may be unsafe
Solution: Add SAFE_* macros and start using those instead
(Keith Thompson)
Use SAFE_() macros for is*() and to*() functions
The standard is*() and to*() functions declared in <ctype.h> have
undefined behavior for negative arguments other than EOF. If plain char
is signed, passing an unchecked value from argv for from user input
to one of these functions has undefined behavior.
Solution: Add SAFE_*() macros that cast the argument to unsigned char.
Most implementations behave sanely for negative arguments, and most
character values in practice are non-negative, but it's still best
to avoid undefined behavior.
The change from #13347 has been omitted, as this has already been
separately fixed in commit ac709e2fc0db6d31abb7da96f743c40956b60c3a
(v9.0.2054)
fixes: #13332
closes: #13347
Signed-off-by: Keith Thompson <Keith.S.Thompson@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: don't try to copy SMACK attribute, when none exist
Solution: return early if SMACK extended attributes do not exist or
if they are not supported
closes: #1711
closes: #13348
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: xattr: permission-denied errors on write
Solution: ignore those errors
closes: #13246
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Gene C <arch@sapience.com>
|
|
Problem: xattr errors not translated
Solution: mark for translation, consistently capitalize
first letter.
closes: #13236
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
Problem: xattr support fails to build on MacOS X
Solution: Disable xattr support for MacOS X
MacOS X uses the same headers and functions sys/xattr.h but the function
signatures for xattr support are much different, so building fails.
So let's for now disable xattr support there.
closes: #13230
closes: #13232
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: Configure script may not detect xattr correctly
Solution: include sys/xattr instead of attr/xattr,
make Test_write_with_xattr_support() test
xattr feature correctly
This also applies to the Smack security feature, so change the include
and configure script for it as well.
closes: #13229
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
Problem: No support for writing extended attributes
Solution: Add extended attribute support for linux
It's been a long standing issue, that if you write a file with extended
attributes and backupcopy is set to no, the file will loose the extended
attributes.
So this patch adds support for retrieving the extended attributes and
copying it to the new file. It currently only works on linux, mainly
because I don't know the different APIs for other systems (BSD, MacOSX and
Solaris). On linux, this should be supported since Kernel 2.4 or
something, so this should be pretty safe to use now.
Enable the extended attribute support with normal builds.
I also added it explicitly to the :version output as well as make it
able to check using `:echo has("xattr")`, to have users easily check
that this is available.
In contrast to the similar support for SELINUX and SMACK support (which
also internally uses extended attributes), I have made this a FEAT_XATTR
define, instead of the similar HAVE_XATTR.
Add a test and change CI to include relevant packages so that CI can
test that extended attributes are correctly written.
closes: #306
closes: #13203
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: filename expansion using ** in bash may fail
Solution: Try to enable the globstar setting
Starting with bash 4.0 it supports extended globbing using the globstar
shell option. This makes matching recursively below a certain directory
using the ** pattern work as expected nowadays. However, we need to
explicitly enable this using the 'shopt -s globstar' bash command.
So let's check the bash environment variable $BASH_VERSINFO (which is
supported since bash 3.0 and conditionally enable the globstar option,
if the major version is at least 4. For older bashs, this at least
shouldn't cause errors (unless one is using really ancient bash 2.X or
something).
closes: #13002
closes: #13144
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: compiler warnings with clang-17
Solution: Fix function prototypes and function pointer
fix: clang compilation warnings with -Wstrict-prototypes
Change fixes this kind of compilation warnings with clang:
```
proto/if_python3.pro:13:20: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
13 | int python3_version();
| ^
| void
```
closes: #13166
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Dominique Pellé <dominique.pelle@tomtom.com>
|
|
Problem: Build failure with tiny features.
Solution: Add #ifdef's.
|
|
Problem: The log file does not give information about window sizes.
Solution: Add a few log messages about obtaining the window size.
|
|
Problem: Error messages are not translated.
Solution: Add _().
|
|
Problem: RedrawingDisabled not used consistently.
Solution: Avoid RedrawingDisabled going negative. Set RedrawingDisabled in
win_split_ins(). (closes #11961)
|
|
Problem: Recent glibc marks sigset() as a deprecated.
Solution: Use sigaction() in mch_signal() if possible. (Ozaki Kiichi,
closes #12373)
|
|
Problem: Warnings for function declarations.
Solution: Add argument types. (Michael Jarvis, closes #12277)
|
|
Problem: MacOS: building fails if clock_gettime() is not available.
Solution: Add a configure check for clock_gettime(). (closes #12242)
|
|
Problem: Unused variables and functions.
Solution: Delete items and adjust #ifdefs. (Dominique Pellé, closes #12145)
|
|
Problem: FOR_ALL_ macros are defined in an unexpected file.
Solution: Move FOR_ALL_ macros to macros.h. Add FOR_ALL_HASHTAB_ITEMS.
(Yegappan Lakshmanan, closes #12109)
|
|
Problem: job_status() may return "dead" if the process parent changed.
Solution: Call mch_process_running() to check if the job is still alive.
|
|
Problem: Code is indented more than necessary.
Solution: Use an early return where it makes sense. (Yegappan Lakshmanan,
closes #11819)
|
|
Problem: Code to enable/disable mouse is not from terminfo/termcap.
Solution: Request the "XM" entry and use it to set 'ttymouse' if possible.
|
|
Problem: The "kitty" terminfo entry is not widespread, resulting in the
kitty terminal not working properly.
Solution: Go back to using "xterm-kitty" and avoid the problems it causes in
another way.
|
|
Problem: The keyboard state response may end up in a shell command.
Solution: Only request the keyboard protocol state when the typeahead is
empty, no more commands are following and not exiting. Add the
t_RK termcap entry for this.
|
|
Problem: It is not easy to see what client-server commands are doing.
Solution: Add channel log messages if ch_log() is available. Move the
channel logging and make it available with the +eval feature.
|
|
Problem: Using one window for executing autocommands is insufficient.
Solution: Use up to five windows for executing autocommands.
|
|
Problem: 'ttyfast' is set for arbitrary terminals.
Solution: Always set 'ttyfast'. (closes #11549)
|
|
Problem: Cannot debug the Kitty keyboard protocol with TermDebug.
Solution: Add Kitty keyboard protocol support to the libvterm fork.
Recognize the escape sequences that the protocol generates. Add
the 'keyprotocol' option to allow the user to specify for which
terminal what protocol is to be used, instead of hard-coding this.
Add recognizing the kitty keyboard protocol status.
|
|
Problem: Various comment and indent flaws.
Solution: Improve comments and indenting.
|
|
Problem: No native sound support on Mac OS.
Solution: Add sound support for Mac OS. (Yee Cheng Chin, closes #11274)
|
|
Problem: passing modifier codes to a shell running in the GUI. (Gary
Johnson)
Solution: Include modifier codes into the key and drop the modifiers.
|
|
Problem: BS and DEL do not work properly in an interacive shell. (Gary
Johnson)
Solution: Adjust the length for replaced codes.
|
|
Problem: system() opens a terminal window when using the GUI and "!" is in
'guioptions'.
Solution: Do not use a terminal window when the SHELL_SILENT flag is used.
(closes #11202)
|
|
Problem: Clang warns for dead assignments.
Solution: Adjust the code. (Yegappan Lakshmanan, closes #11048)
|
|
Problem: Irix systems no longer exist.
Solution: Remove references to Irix. (Yegappan Lakshmanan, closes #10994)
|
|
Problem: Using INIT() in non-header files.
Solution: Remove INIT(). (closes #10981)
|
|
Problem: Redraw flags are not named specifically.
Solution: Prefix "UPD_" to the flags, for UPDate_screen().
|
|
Problem: Get hit-enter prompt for system() when '!' is in 'guioptions'.
Solution: Do not call wait_return() when not redrawing. (closes #3327)
|
|
Problem: Still mentioning version8, some cosmetic issues.
Solution: Prefer mentioning version9, cosmetic improvements.
|
|
Problem: Using "volatile int" in a signal handler might be wrong.
Solution: Use "volatile sig_atomic_t".
|
|
Problem: Cannot build without the +channel feature. (Dominique Pellé)
Solution: Add #ifdef around ch_log() calls. (closes #10598)
|
|
Problem: Timeout handling is not optimal.
Solution: Avoid setting timeout_flag twice. Adjust the pointer when
stopping the regexp timeout. Adjust variable name.
|
|
Problem: Search timeout is overrun with some patterns.
Solution: Check for timeout in more places. Make the flag volatile and
atomic. Use assert_inrange() to see what happened.
|
|
Problem: Timer becomes invalid after fork/exec, :gui gives errors. (Gabriel
Dupras)
Solution: Delete the timer befor forking. (closes #10584)
|
|
Problem: Timer_create is not available on every Mac system. (Hisashi T
Fujinaka)
Solution: Adjust #ifdef.
|
|
Problem: Coverity warns for dead code.
Solution: Remove the dead code.
|
|
Problem: C89 requires signal handlers to return void.
Solution: Drop RETSIGTYPE and hard-code a void return value.
|
|
Problem: Using gettimeofday() for timeout is very inefficient.
Solution: Set a platform dependent timer. (Paul Ollis, closes #10505)
|
|
Problem: Various white space and cosmetic mistakes.
Solution: Change spaces to tabs, improve comments.
|