]> git.ipfire.org Git - thirdparty/shadow.git/commit
src/usermod.c: Use id_t for parsing uid_t and gid_t
authorAlejandro Colomar <alx@kernel.org>
Thu, 15 Feb 2024 14:50:45 +0000 (15:50 +0100)
committerSerge Hallyn <serge@hallyn.com>
Fri, 12 Jul 2024 03:42:58 +0000 (22:42 -0500)
commit2dda45a390d5bbccb128234103d7776d65cfe604
treeefc0e40fc206bd1bca9372661c09b86dbd92769e
parentcfb8df4a91ff63228ab35899f88bbd0f04996c3d
src/usermod.c: Use id_t for parsing uid_t and gid_t

Use a static_assert(3) to make sure that id_t == uid_t == gid_t.

And use uintmax_t to print it, since on Linux they are unsigned types.

Link: <https://github.com/shadow-maint/shadow/pull/951>
Reviewed-by: Tycho Andersen <tycho@tycho.pizza>
Cc: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
src/usermod.c