]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libuuid: clear uuidd cache on fork()
authorThomas Weißschuh <thomas@t-8ch.de>
Tue, 7 May 2024 11:44:31 +0000 (13:44 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Tue, 14 May 2024 10:13:58 +0000 (12:13 +0200)
commita3f1255f1891ddbaf3bb6a32af28569c0e6f3b91
tree9afe138e5eac81eb78dcacdd249ca04152db3c6c
parent26dbc85838b06bd3e5349a81a4ce869efdd9f883
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>
libuuid/src/Makemodule.am
libuuid/src/gen_uuid.c