summaryrefslogtreecommitdiffstats
path: root/login-utils
diff options
context:
space:
mode:
authorKarel Zak2018-02-01 15:41:23 +0100
committerKarel Zak2018-02-01 15:41:23 +0100
commit856fcfd104607dad9dc77550af8f940d64bd97d6 (patch)
tree4d3685e33d0b5f68726c2b7cf74b1d4ad9c9a2e0 /login-utils
parentschedutils: use errexec() (diff)
downloadkernel-qcow2-util-linux-856fcfd104607dad9dc77550af8f940d64bd97d6.tar.gz
kernel-qcow2-util-linux-856fcfd104607dad9dc77550af8f940d64bd97d6.tar.xz
kernel-qcow2-util-linux-856fcfd104607dad9dc77550af8f940d64bd97d6.zip
newgrp: use errexec()
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils')
-rw-r--r--login-utils/newgrp.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/login-utils/newgrp.c b/login-utils/newgrp.c
index 7358ba112..453883148 100644
--- a/login-utils/newgrp.c
+++ b/login-utils/newgrp.c
@@ -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);
}