summaryrefslogtreecommitdiff
path: root/ssh-add.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2014-07-03 21:23:01 +1000
committerDamien Miller <djm@mindrot.org>2014-07-03 21:23:01 +1000
commitd7ca2cd31ecc4d63a055e2dcc4bf35c13f2db4c5 (patch)
tree7e1abd88e8fc2a5f548b29656931fbb981ca8bab /ssh-add.c
parentb1e967c8d7c7578dd0c172d85b3046cf54ea42ba (diff)
- djm@cvs.openbsd.org 2014/07/03 03:15:01
[ssh-add.c] make stdout line-buffered; saves partial output getting lost when ssh-add fatal()s part-way through (e.g. when listing keys from an agent that supports key types that ssh-add doesn't); bz#2234, reported by Phil Pennock
Diffstat (limited to 'ssh-add.c')
-rw-r--r--ssh-add.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ssh-add.c b/ssh-add.c
index 07558ae5..05889408 100644
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-add.c,v 1.111 2014/06/27 18:50:39 markus Exp $ */
+/* $OpenBSD: ssh-add.c,v 1.112 2014/07/03 03:15:01 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -437,6 +437,8 @@ main(int argc, char **argv)
OpenSSL_add_all_algorithms();
+ setlinebuf(stdout);
+
/* At first, get a connection to the authentication agent. */
ac = ssh_get_authentication_connection();
if (ac == NULL) {