su: endpwent on exit

This commit is contained in:
apio 2022-10-29 10:01:51 +02:00
parent 8375701bf6
commit 33ed6e5c17

View File

@ -87,6 +87,7 @@ void show_prompt()
username = "??"; username = "??";
} }
else { username = user->pw_name; } else { username = user->pw_name; }
atexit(endpwent);
} }
if (WEXITSTATUS(status)) { printf("%d [%s]> ", WEXITSTATUS(status), username); } if (WEXITSTATUS(status)) { printf("%d [%s]> ", WEXITSTATUS(status), username); }
else else