newgrp: use errexec()

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2018-02-01 15:41:23 +01:00
parent 61b6222269
commit 856fcfd104
1 changed files with 1 additions and 4 deletions

View File

@ -236,8 +236,5 @@ int main(int argc, char *argv[])
shell = (pw_entry->pw_shell && *pw_entry->pw_shell ?
pw_entry->pw_shell : _PATH_BSHELL);
execl(shell, shell, (char *)0);
warn(_("failed to execute %s"), shell);
fflush(stderr);
return EXIT_FAILURE;
errexec(shell);
}