From 589e24a625c5e83805e95b917eaf3bf1be64369e Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 5 Sep 2012 11:21:07 +0200 Subject: [PATCH 204/208] su: verify writing to streams was successful Signed-off-by: Karel Zak --- login-utils/su-common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/login-utils/su-common.c b/login-utils/su-common.c index a253dda..1f97328 100644 --- a/login-utils/su-common.c +++ b/login-utils/su-common.c @@ -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" @@ -658,6 +659,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; -- 1.7.11.7