From 3ceb92d1cb14ed2b641bc670d1b097d7d87c15f2 Mon Sep 17 00:00:00 2001 From: Marco Pfatschbacher Date: Thu, 8 Oct 2009 15:56:47 +0000 Subject: Do not write "Connection to ... succeeded" messages to stdout. OK gilles, rainer, millert, deraadt. --- usr.bin/nc/netcat.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c index 6700f89cfe5..17ffc8921f7 100644 --- a/usr.bin/nc/netcat.c +++ b/usr.bin/nc/netcat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.93 2009/06/05 00:18:10 claudio Exp $ */ +/* $OpenBSD: netcat.c,v 1.94 2009/10/08 15:56:46 mpf Exp $ */ /* * Copyright (c) 2001 Eric Jackson * @@ -403,8 +403,10 @@ main(int argc, char *argv[]) uflag ? "udp" : "tcp"); } - printf("Connection to %s %s port [%s/%s] succeeded!\n", - host, portlist[i], uflag ? "udp" : "tcp", + fprintf(stderr, + "Connection to %s %s port [%s/%s] " + "succeeded!\n", host, portlist[i], + uflag ? "udp" : "tcp", sv ? sv->s_name : "*"); } if (!zflag) -- cgit v1.2.3