session: endpwent on exit
This commit is contained in:
parent
7aad256acd
commit
8395eb16f6
@ -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;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user