From 802959f398bfc0c7acac9252e7a8f1a021884ce8 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 23 Feb 2012 12:34:43 -0500 Subject: [PATCH] core: Ensure .archive-content files are mode 0644 We don't want to inherit the permissions of the actual file, otherwise trying to fetch e.g. /etc/passwd when being served via Apache httpd will break. --- src/libostree/ostree-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c index c2dfd11c..9f48c311 100644 --- a/src/libostree/ostree-core.c +++ b/src/libostree/ostree-core.c @@ -684,7 +684,7 @@ ostree_create_file_from_input (GFile *dest_file, if (g_cancellable_set_error_if_cancelled (cancellable, error)) return FALSE; - if (finfo != NULL) + if (finfo != NULL && !is_archived_content) { mode = g_file_info_get_attribute_uint32 (finfo, "unix::mode"); }