libuuid: clear uuidd cache on fork()
authorThomas Weißschuh <thomas@t-8ch.de>
Tue, 7 May 2024 11:44:31 +0000 (13:44 +0200)
committerChris Hofstaedtler <zeha@debian.org>
Sun, 23 Jun 2024 23:31:42 +0000 (01:31 +0200)
commit06477af55fa2efe0c43624ef4494439f29944aef
tree12771604d5c334646b7c90c2fe138a35ed305dae
parenta6e49bbe93e83e307e0d34036207626c96fe7294
libuuid: clear uuidd cache on fork()

After fork() the memory of the calling thread is preserved into the new
process. This also includes TLS.
Make sure to reset the cache after a fork to avoid reuse of cached
values.

Only the TLS of the thread calling fork() is relevant as that is the
only thread that gets forked.
New threads will received newly initialized TLS.

Fixes https://github.com/util-linux/util-linux/issues/3009
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Gbp-Pq: Topic upstream-master
Gbp-Pq: Name libuuid-clear-uuidd-cache-on-fork.patch
libuuid/src/Makemodule.am
libuuid/src/gen_uuid.c