Skip to content
This repository
Browse code

su: verify writing to streams was successful

Signed-off-by: Karel Zak <kzak@redhat.com>
  • Loading branch information...
commit 4e1834978f7efa6b62616c35e23551ad77d73cd1 1 parent d10028a
Karel Zak authored

Showing 1 changed file with 2 additions and 0 deletions. Show diff stats Hide diff stats

  1. +2 0  login-utils/su-common.c
2  login-utils/su-common.c
@@ -63,6 +63,7 @@ enum
63 63 #include "nls.h"
64 64 #include "pathnames.h"
65 65 #include "env.h"
  66 +#include "closestream.h"
66 67
67 68 /* name of the pam configuration files. separate configs for su and su - */
68 69 #define PAM_SRVNAME_SU "su"
@@ -782,6 +783,7 @@ su_main (int argc, char **argv, int mode)
782 783 setlocale (LC_ALL, "");
783 784 bindtextdomain (PACKAGE, LOCALEDIR);
784 785 textdomain (PACKAGE);
  786 + atexit(close_stdout);
785 787
786 788 su_mode = mode;
787 789 fast_startup = false;

0 comments on commit 4e18349

Please sign in to comment.
Something went wrong with that request. Please try again.