summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Gilbert <floppymaster@gmail.com>2016-04-04 07:08:26 -0400
committerLennart Poettering <lennart@poettering.net>2016-04-04 13:08:26 +0200
commit2944758ccdeb0b86b39ebdcf753c364d8b2c2e18 (patch)
treeb5a416778c63d2b1047eae98d067aad5ddbdc9cb /src
parent331fb4ca51cc88a2822bb213c3fc1756b886ac15 (diff)
import: Preserve xattrs in tar files
Resolves #2908
Diffstat (limited to 'src')
-rw-r--r--src/import/import-common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/import/import-common.c b/src/import/import-common.c
index 18a30be36d..287a3382a1 100644
--- a/src/import/import-common.c
+++ b/src/import/import-common.c
@@ -136,7 +136,7 @@ int import_fork_tar_x(const char *path, pid_t *ret) {
if (r < 0)
log_error_errno(r, "Failed to drop capabilities, ignoring: %m");
- execlp("tar", "tar", "--numeric-owner", "-C", path, "-px", NULL);
+ execlp("tar", "tar", "--numeric-owner", "-C", path, "-px", "--xattrs", "--xattrs-include=*", NULL);
log_error_errno(errno, "Failed to execute tar: %m");
_exit(EXIT_FAILURE);
}
@@ -210,7 +210,7 @@ int import_fork_tar_c(const char *path, pid_t *ret) {
if (r < 0)
log_error_errno(r, "Failed to drop capabilities, ignoring: %m");
- execlp("tar", "tar", "-C", path, "-c", ".", NULL);
+ execlp("tar", "tar", "-C", path, "-c", "--xattrs", "--xattrs-include=*", ".", NULL);
log_error_errno(errno, "Failed to execute tar: %m");
_exit(EXIT_FAILURE);
}