diff options
author | Alexander Larsson <alexl@redhat.com> | 2016-05-12 19:35:32 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2016-05-12 19:35:32 +0200 |
commit | 9d6bc9964988842aea8226a3d3320da452bb58ea (patch) | |
tree | 26e840cd7463e46a31f4a711e4f09ad7cfe4f75b | |
parent | c5e178f339e12fe06b82681e9ac233ba98559db6 (diff) | |
download | xdg-app-9d6bc9964988842aea8226a3d3320da452bb58ea.tar.gz |
builder: Untar with --no-same-owner
Without this if you run as root (which is generally a poor idea) it will
extract the sources with the user/group specified on the archive, which
is never what you want when building code.
-rw-r--r-- | builder/builder-source-archive.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builder/builder-source-archive.c b/builder/builder-source-archive.c index 66d4527..c063b2b 100644 --- a/builder/builder-source-archive.c +++ b/builder/builder-source-archive.c @@ -534,7 +534,7 @@ builder_source_archive_extract (BuilderSource *source, { g_autofree char *strip_components = g_strdup_printf ("--strip-components=%u", self->strip_components); /* Note: tar_decompress_flag can return NULL, so put it last */ - if (!tar (dest, error, "xf", archive_path, strip_components, tar_decompress_flag (type), NULL)) + if (!tar (dest, error, "xf", archive_path, "--no-same-owner", strip_components, tar_decompress_flag (type), NULL)) return FALSE; } else if (type == ZIP) |