summaryrefslogtreecommitdiffstats
path: root/source4/heimdal/lib/hcrypto/ui.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-08-01 20:17:56 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-08-01 20:17:56 +0200
commit2fbe25b39d096b55a5dbb80720cd01e08e42a2b0 (patch)
tree64a0a19d5278bb341396189789fd41e530e31d0d /source4/heimdal/lib/hcrypto/ui.c
parent3573420d7d108d796e0b424c131061dc74c23033 (diff)
parentf2ac351d6ef8d240f9e45f4df58b022052457d76 (diff)
downloadsamba-2fbe25b39d096b55a5dbb80720cd01e08e42a2b0.tar.gz
samba-2fbe25b39d096b55a5dbb80720cd01e08e42a2b0.tar.xz
samba-2fbe25b39d096b55a5dbb80720cd01e08e42a2b0.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into manpage
(This used to be commit c87a8ba1fef1ba508ad6527d0bae4bcdd5b3cb69)
Diffstat (limited to 'source4/heimdal/lib/hcrypto/ui.c')
-rw-r--r--source4/heimdal/lib/hcrypto/ui.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/heimdal/lib/hcrypto/ui.c b/source4/heimdal/lib/hcrypto/ui.c
index 3e651998b5..8c3ea1fa15 100644
--- a/source4/heimdal/lib/hcrypto/ui.c
+++ b/source4/heimdal/lib/hcrypto/ui.c
@@ -33,7 +33,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
-RCSID("$Id: ui.c 18158 2006-09-22 15:45:57Z lha $");
+RCSID("$Id: ui.c 23466 2008-07-27 12:16:15Z lha $");
#endif
#include <stdio.h>
@@ -84,7 +84,9 @@ read_string(const char *preprompt, const char *prompt,
if (sigaction(i, &sa, &sigs[i]) == 0)
oksigs[i] = 1;
- if((tty = fopen("/dev/tty", "r")) == NULL)
+ if((tty = fopen("/dev/tty", "r")) != NULL)
+ rk_cloexec_file(tty);
+ else
tty = stdin;
fprintf(stderr, "%s%s", preprompt, prompt);
@@ -116,7 +118,7 @@ read_string(const char *preprompt, const char *prompt,
*p = 0;
if(echo == 0){
- printf("\n");
+ fprintf(stderr, "\n");
tcsetattr(fileno(tty), TCSANOW, &t_old);
}