repo/commit: Support group-writable files for bare-user-only
These exist in the wild for flatpak, and aren't really a problem. The canonical permissions are still either `0755` or `0644`, we just support the additional writable bit for the group (i.e. extend the set to include `0775` and `0664`) now to avoid breaking some flatpak content. Closes: #913 Approved by: alexlarsson
This commit is contained in:
1 parent
81e1f7761f
commit
c81252c1e0
2 files changed
+15
-3
No files matched your search
@@ -301,10 +301,10 @@ commit_loose_object_trusted (OstreeRepo *self,
|
||||
self->mode == OSTREE_REPO_MODE_BARE_USER_ONLY
|
||||
&& !object_is_symlink)
|
||||
{
|
||||
guint32 invalid_modebits = (mode & ~S_IFMT) & ~0755;
|
||||
guint32 invalid_modebits = (mode & ~S_IFMT) & ~0775;
|
||||
if (invalid_modebits > 0)
|
||||
return glnx_throw (error, "Invalid mode 0%04o with bits 0%04o in bare-user-only repository",
|
||||
mode, invalid_modebits);
|
||||
mode, invalid_modebits);
|
||||
|
||||
if (fchmod (fd, mode) < 0)
|
||||
return glnx_throw_errno_prefix (error, "fchmod");
|
||||
|
||||
Reference in new issue
Block a user