upgrade: Refuse chronologically older commits unless --allow-downgrade
We don't want to allow MITM attackers to intercept upgrade requests and provide clients with older OS versions vulnerable to security flaws. Only "ostree admin upgrade" gets this behavior for now - whether we want to do it for "ostree admin switch" is another question.
This commit is contained in:
1 parent
9fc9008af8
commit
f2e0162846
6 files changed
+118
No files matched your search
@@ -1755,3 +1755,11 @@ ostree_commit_get_parent (GVariant *commit_variant)
|
||||
return NULL;
|
||||
return ostree_checksum_from_bytes_v (bytes);
|
||||
}
|
||||
|
||||
guint64
|
||||
ostree_commit_get_timestamp (GVariant *commit_variant)
|
||||
{
|
||||
guint64 ret;
|
||||
g_variant_get_child (commit_variant, 5, "t", &ret);
|
||||
return GUINT64_FROM_BE (ret);
|
||||
}
|
||||
Reference in new issue
Block a user