[ostree] core: Ensure .archive-content files are mode 0644
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] core: Ensure .archive-content files are mode 0644
- Date: Thu, 23 Feb 2012 17:36:01 +0000 (UTC)
commit 802959f398bfc0c7acac9252e7a8f1a021884ce8
Author: Colin Walters <walters verbum org>
Date: Thu Feb 23 12:34:43 2012 -0500
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 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c
index c2dfd11..9f48c31 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");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]