Skip to content

Commit 5a679b2

Browse files
committed
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 <[email protected]>
1 parent 215c326 commit 5a679b2

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

src/os_unix.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3047,6 +3047,11 @@ mch_copy_sec(char_u *from_file, char_u *to_file)
30473047
if (from_file == NULL)
30483048
return;
30493049

3050+
size = listxattr((char *)from_file, NULL, 0);
3051+
// not supported or no attributes to copy
3052+
if (errno == ENOTSUP || size == 0)
3053+
return;
3054+
30503055
for (index = 0 ; index < (int)(sizeof(smack_copied_attributes)
30513056
/ sizeof(smack_copied_attributes)[0]) ; index++)
30523057
{

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ static char *(features[]) =
704704

705705
static int included_patches[] =
706706
{ /* Add new patch number below this line */
707+
/**/
708+
2034,
707709
/**/
708710
2033,
709711
/**/

0 commit comments

Comments
 (0)