forked from aniani/vim
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>
This commit is contained in:
parent
215c3261a2
commit
5a679b2263
@ -3047,6 +3047,11 @@ mch_copy_sec(char_u *from_file, char_u *to_file)
|
|||||||
if (from_file == NULL)
|
if (from_file == NULL)
|
||||||
return;
|
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)
|
for (index = 0 ; index < (int)(sizeof(smack_copied_attributes)
|
||||||
/ sizeof(smack_copied_attributes)[0]) ; index++)
|
/ sizeof(smack_copied_attributes)[0]) ; index++)
|
||||||
{
|
{
|
||||||
|
@ -704,6 +704,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2034,
|
||||||
/**/
|
/**/
|
||||||
2033,
|
2033,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user