util-linux/0204-su-verify-writing-to-streams-was-successful.patch
Karel Zak 7443d56081 2.22.1-3: enable su(1) and runuser(1)
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-11-01 15:09:04 +01:00

34 lines
936 B
Diff

From 589e24a625c5e83805e95b917eaf3bf1be64369e Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
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 <kzak@redhat.com>
---
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