changeset 33579:1f154b010b66 v9.0.2034

patch 9.0.2034: don't try to copy SMACK attribute, when none exist Commit: https://github.com/vim/vim/commit/5a679b2263f597950f99c60a99d4d1a192e9f639 Author: Christian Brabandt <cb@256bit.org> Date: Mon Oct 16 10:17:13 2023 +0200 patch 9.0.2034: don't try to copy SMACK attribute, when none exist 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>
author Christian Brabandt <cb@256bit.org>
date Mon, 16 Oct 2023 10:30:07 +0200
parents 0c36813bed95
children c6adca2035dc
files src/os_unix.c src/version.c
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -3047,6 +3047,11 @@ mch_copy_sec(char_u *from_file, char_u *
     if (from_file == NULL)
 	return;
 
+    size = listxattr((char *)from_file, NULL, 0);
+    // not supported or no attributes to copy
+    if (errno == ENOTSUP || size == 0)
+	return;
+
     for (index = 0 ; index < (int)(sizeof(smack_copied_attributes)
 			      / sizeof(smack_copied_attributes)[0]) ; index++)
     {
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2034,
+/**/
     2033,
 /**/
     2032,