]> git.ipfire.org Git - thirdparty/shadow.git/commit
src/sulogin.c: Remove 'static' from a temporary variable
authorAlejandro Colomar <alx@kernel.org>
Wed, 17 Jan 2024 16:02:27 +0000 (17:02 +0100)
committerSerge Hallyn <serge@hallyn.com>
Thu, 18 Jan 2024 00:11:19 +0000 (18:11 -0600)
commit4edda5d8baaceb1d38d3d9e79709dacb5b82798f
tree00515f09cef860034a1c55d682fc0dd9a119a402
parentd2c28a402a84813b721f171f6c8022864bd45aa6
src/sulogin.c: Remove 'static' from a temporary variable

There's no need to keep 'pass' in .bss:

$ grep -nC3 '\<pass\>' src/sulogin.c
58-/*ARGSUSED*/ int main (int argc, char **argv)
59-{
60- int     err = 0;
61: char    pass[BUFSIZ];
62- char    **envp = environ;
63- TERMIO  termio;
64-#ifndef USE_PAM
--
166-#endif
167- exit (0);
168- }
169: STRTCPY(pass, cp);
170- erase_pass (cp);
171-
172: if (valid (pass, &pwent)) { /* check encrypted passwords ... */
173- break; /* ... encrypted passwords matched */
174- }
175-
176- sleep (2);
177- (void) puts (_("Login incorrect"));
178- }
179: MEMZERO(pass);
180- (void) alarm (0);
181- (void) signal (SIGALRM, SIG_DFL);
182- environ = newenvp; /* make new environment active */

Cc: Samanta Navarro <ferivoz@riseup.net>
Cc: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
src/sulogin.c