[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-tar] [PATCH] src/xattrs.c: fix for 'security.ima'
From: |
Mimi Zohar |
Subject: |
[Bug-tar] [PATCH] src/xattrs.c: fix for 'security.ima' |
Date: |
Tue, 11 Mar 2014 18:08:29 -0400 |
Defer writing 'security.ima' until after copying the file.
Signed-off-by: Mimi Zohar <address@hidden>
---
src/xattrs.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/xattrs.c b/src/xattrs.c
index dac15f3..dab5901 100644
--- a/src/xattrs.c
+++ b/src/xattrs.c
@@ -646,9 +646,14 @@ xattrs_xattrs_set (struct tar_stat_info const *st,
should exist something like xattrs_capabilities_set() call.
For a regular files: all extended attributes are restored during
the first run except 'security.capability' which is restored in
- 'later_run == 1'. */
+ 'later_run == 1'.
+
+ Defer writing 'security.ima' until after copying the file.
+ */
if (typeflag == REGTYPE
- && later_run == !!strcmp (keyword, "security.capability"))
+ && later_run == !(!strcmp (keyword, "security.capability")
+ || !strcmp (keyword, "security.ima")))
+
continue;
if (xattrs_masked_out (keyword, false /* extracting */ ))
--
1.8.1.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-tar] [PATCH] src/xattrs.c: fix for 'security.ima',
Mimi Zohar <=