]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.1975: xattr: permission-denied errors on write v9.0.1975
authorGene C <arch@sapience.com>
Mon, 2 Oct 2023 20:42:26 +0000 (22:42 +0200)
committerChristian Brabandt <cb@256bit.org>
Mon, 2 Oct 2023 20:44:12 +0000 (22:44 +0200)
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>
src/errors.h
src/os_unix.c
src/version.c

index bb807e7d56a9041ce19ff9c7e9e85f33869c8098..817589288174d83152edb6a3dc5cfe402f60196e 100644 (file)
@@ -3554,12 +3554,10 @@ EXTERN char e_invalid_format_specifier_str[]
        INIT(= N_("E1505: Invalid format specifier: %s"));
 EXTERN char e_xattr_erange[]
        INIT(= N_("E1506: Buffer too small to copy xattr value or key"));
-EXTERN char e_xattr_enotsup[]
-       INIT(= N_("E1507: Extended attributes are not supported by the filesystem"));
 EXTERN char e_xattr_e2big[]
        INIT(= N_("E1508: Size of the extended attribute value is larger than the maximum size allowed"));
 EXTERN char e_xattr_other[]
        INIT(= N_("E1509: Error occured when reading or writing extended attribute"));
-// E1509 - E1519 unused
+// E1507, E1509 - E1519 unused
 EXTERN char e_aptypes_is_null_nr_str[]
        INIT(= "E1520: Internal error: ap_types or ap_types[idx] is NULL: %d: %s");
index 9356db0b75765dc1329d84ab98d6bd2ebca9f2e1..237171b4fae04f99a5ec98f0bf7e6097feb585c6 100644 (file)
@@ -3154,8 +3154,9 @@ mch_copy_xattr(char_u *from_file, char_u *to_file)
                        errmsg = e_xattr_e2big;
                        goto error_exit;
                    case ENOTSUP:
-                       errmsg = e_xattr_enotsup;
-                       goto error_exit;
+                   case EACCES:
+                   case EPERM:
+                       break;
                    case ERANGE:
                        errmsg = e_xattr_erange;
                        goto error_exit;
index b46d20c2c896a164f058ae1d8456f45e34b0da3f..9022edb535c7e99e00709123decd892de9ab3e71 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1975,
 /**/
     1974,
 /**/