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.
This commit is contained in:
Colin Walters 2012-02-23 12:34:43 -05:00
parent dee30bda7c
commit 802959f398

View File

@ -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");
}