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>
Thu, 30 May 2024 17:14:16 +0000 (19:14 +0200)
commitf10daf5cf3da2c8335128b91c491442132602ba6
tree43358dde6677aaa40ff4d3860ff4bf498b218802
parentc87b96795837b85fe42e0d6350c85d62a1e216dd
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