Permalink
Browse files

su: verify writing to streams was successful

Signed-off-by: Karel Zak <kzak@redhat.com>
  • Loading branch information...
1 parent d10028a commit 4e1834978f7efa6b62616c35e23551ad77d73cd1 @karelzak committed Sep 5, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 login-utils/su-common.c
View
@@ -63,6 +63,7 @@ enum
#include "nls.h"
#include "pathnames.h"
#include "env.h"
+#include "closestream.h"
/* name of the pam configuration files. separate configs for su and su - */
#define PAM_SRVNAME_SU "su"
@@ -782,6 +783,7 @@ su_main (int argc, char **argv, int mode)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ atexit(close_stdout);
su_mode = mode;
fast_startup = false;

0 comments on commit 4e18349

Please sign in to comment.