debian-forge-composer/internal/disk
Christian Kellner fb7f92aa95 disk: clone partition table before modifying it
The partition table is modified `CreatePartitionTable`, which is
not a problem for the table itself since it is currently passed
by value. However, all shallow copies share the same file system
pointers and `CreatePartitionTable` will modify those as well.
As there is a data race where two concurrent thread modify the
content of the Fileystem object at the same time before writing
the uuids out to the manifest via the stage options and thus the
resulting manifest would be broken.
Therefore we use the new `Clone` methods to make a dee@ copy of
the `PartitionTable` object in the `CreatePartitionTable` method;
This will allow us to pass the `basePartitionTable` object by val
and also return the resulting `PartitionTable` as a pointer.
2022-02-22 19:23:41 +00:00
..
customizations.go disk: clone partition table before modifying it 2022-02-22 19:23:41 +00:00
disk.go disk: add Clone helpers 2022-02-22 19:23:41 +00:00
disk_test.go gosec: G404 - Use of weak rng 2021-12-13 12:17:30 +02:00