From: Iker Pedrosa Date: Tue, 25 Nov 2025 08:52:03 +0000 (+0100) Subject: useradd: fix uninitialized flags causing aarch64 failure X-Git-Tag: 4.19.0-rc1~45 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f4c9f5e83e03bdc12294875b5f194a355dc33ce1;p=thirdparty%2Fshadow.git useradd: fix uninitialized flags causing aarch64 failure Initialize option_flags structure to prevent garbage memory values in `flags.chroot` and `flags.prefix` fields. Uninitialized memory caused architecture-specific failures where process_selinux evaluation differed between x86_64 and aarch64, leading to `pw_close()` failures when SELinux contexts weren't properly managed. Fixes: c0c9485d (2025-04-25; "src/useradd.c: chroot or prefix SELinux file context") Link: Signed-off-by: Iker Pedrosa --- diff --git a/src/useradd.c b/src/useradd.c index 7cce5b703..e9bec7c61 100644 --- a/src/useradd.c +++ b/src/useradd.c @@ -2443,7 +2443,10 @@ int main (int argc, char **argv) #endif unsigned long subuid_count = 0; unsigned long subgid_count = 0; - struct option_flags flags; + struct option_flags flags = { + .chroot = false, + .prefix = false, + }; bool process_selinux; log_set_progname(Prog);