]> git.ipfire.org Git - thirdparty/systemd.git/commit
sysusers: add comments and simplify how set with names is created
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 9 Jul 2023 19:11:57 +0000 (13:11 -0600)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 13 Jul 2023 09:12:00 +0000 (11:12 +0200)
commitc8e02e408fee6735abc62b72dba5a951c87f302f
tree6554dfcf1a9140a24c3a1bb062c8b1eaa6b1f14c
parent09ace4c76d8be4ed0292d3642062aaadd90d8957
sysusers: add comments and simplify how set with names is created

The code was correct, but rather confusing: it used two sets with strings with
trivial_hash_ops to store strings used in other hashmaps. Let's add a bunch of
comments to explain what is happening. We also don't need two sets, using just
one saves a bit of memory.

While at it, let's add some debug messages if duplicate user/group names or
uids/gids are present.
src/sysusers/sysusers.c