]> dgit.raspbian.org Git - git-annex.git/commit
make cluster UUIDs distinguishable from any other repository UUID
authorJoey Hess <joeyh@joeyh.name>
Fri, 14 Jun 2024 15:07:31 +0000 (11:07 -0400)
committerJoey Hess <joeyh@joeyh.name>
Fri, 14 Jun 2024 15:11:09 +0000 (11:11 -0400)
commitda3c0115cb2df8d541ee446b4190e64bb9fdd6f5
treeeedd6e4360ce2b39bf53413fac638bdda75ef374
parent6d59118b2942b43f96ddbebeb35adef472accf00
make cluster UUIDs distinguishable from any other repository UUID

A cluster UUID is a version 8 UUID, with first octets 'a' and 'c'.
The rest of the content will be random.

This avoids a class of attack where the UUID of a repository is used as
the UUID of a cluster, which will prevent git-annex from updating
location logs for that repository. I don't know why someone would want
to do that, but let's prevent it.

Also, isClusterUUID make it easy to filter out cluster UUIDs when
writing the location logs.
Logs/Cluster.hs
Types/Cluster.hs