diff --git a/apps/src/session.c b/apps/src/session.c index abcc707e..58ea1afb 100644 --- a/apps/src/session.c +++ b/apps/src/session.c @@ -110,6 +110,8 @@ static int login() int main(int argc, char** argv) { + (void)argc; + if (getuid() != 0) { fprintf(stderr, @@ -121,8 +123,10 @@ int main(int argc, char** argv) for (;;) { - if (login()) return EXIT_SUCCESS; + if (login()) break; } - (void)argc; + endpwent(); + + return EXIT_SUCCESS; } \ No newline at end of file