]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
newgrp: use errexec()
authorKarel Zak <kzak@redhat.com>
Thu, 1 Feb 2018 14:41:23 +0000 (15:41 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 1 Feb 2018 14:41:23 +0000 (15:41 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/newgrp.c

index 7358ba1121011b9a529fee65a305e4178371b78d..4538831480f5d24c1c2f67973b6547d489a161ae 100644 (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);
 }