]> git.ipfire.org Git - thirdparty/shadow.git/commit
src/: Fix uninitialized flags, and use const appropriately
authorAlejandro Colomar <alx@kernel.org>
Fri, 5 Dec 2025 13:11:56 +0000 (14:11 +0100)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Fri, 5 Dec 2025 13:57:42 +0000 (14:57 +0100)
commitdcc0db3fdb79ec33d8b2155425b6d4156cf9f85a
treeafc586667b3196d7e6dfa7eabd413d691df05947
parent423368e457814c51a8ff28efe6952aa4481d1e38
src/: Fix uninitialized flags, and use const appropriately

In all these functions, we were setting the flags to 'true' in
process_flags() if the appropriate command-line flag was specified.
However, they were never being defined to 'false', which should be the
default value.  Initialize these flags to false.

Fixes: c0c9485d9a5a (2025-10-07; "src/useradd.c: chroot or prefix SELinux file context")
Link: <https://github.com/shadow-maint/shadow/pull/1396>
Reviewed-by: Serge Hallyn <serge@hallyn.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
21 files changed:
src/chage.c
src/chfn.c
src/chgpasswd.c
src/chpasswd.c
src/chsh.c
src/gpasswd.c
src/groupadd.c
src/groupdel.c
src/groupmems.c
src/groupmod.c
src/grpck.c
src/grpconv.c
src/grpunconv.c
src/newusers.c
src/passwd.c
src/pwck.c
src/pwconv.c
src/pwunconv.c
src/useradd.c
src/userdel.c
src/usermod.c