session: endpwent on exit

This commit is contained in:
apio 2022-10-29 10:18:39 +02:00
parent 7aad256acd
commit 8395eb16f6

View File

@ -110,6 +110,8 @@ static int login()
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
(void)argc;
if (getuid() != 0) if (getuid() != 0)
{ {
fprintf(stderr, fprintf(stderr,
@ -121,8 +123,10 @@ int main(int argc, char** argv)
for (;;) for (;;)
{ {
if (login()) return EXIT_SUCCESS; if (login()) break;
} }
(void)argc; endpwent();
return EXIT_SUCCESS;
} }