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>
Mon, 3 Jun 2024 15:03:37 +0000 (17:03 +0200)
commit725742068bfacd4a381f7f0a5d544f461ef5a2e3
tree578f415b6cde7f8567d7dffcdff843c892dfe410
parent455cbfe215e05dc70eac0a62876a84c58d4f0810
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