patch 9.0.1975: xattr: permission-denied errors on write

Commit: 
https://github.com/vim/vim/commit/993b17569b5acffe2d8941d1709a55da4e439755
Author: Gene C <a...@sapience.com>
Date:   Mon Oct 2 22:42:26 2023 +0200

    patch 9.0.1975: xattr: permission-denied errors on write
    
    Problem:  xattr: permission-denied errors on write
    Solution: ignore those errors
    
    closes: #13246
    
    Signed-off-by: Christian Brabandt <c...@256bit.org>
    Co-authored-by: Gene C <a...@sapience.com>

diff --git a/src/errors.h b/src/errors.h
index bb807e7d5..817589288 100644
--- a/src/errors.h
+++ b/src/errors.h
@@ -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");
diff --git a/src/os_unix.c b/src/os_unix.c
index 9356db0b7..237171b4f 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -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;
diff --git a/src/version.c b/src/version.c
index b46d20c2c..9022edb53 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1975,
 /**/
     1974,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1qnPmp-004jaC-0x%40256bit.org.

Raspunde prin e-mail lui