Re: GNU netcat in make tests

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



Damien Miller <djm@xxxxxxxxxxx> on Fri, 2014/07/25 09:02:
> On Thu, 24 Jul 2014, Damien Miller wrote:
> 
> > In the meantime, maybe we could avoid the use of GNU netcat althother
> > by using a ssh-agent's socket in the tests...
> 
> I got halfway through implementing this before realising that it is
> insufficient - we need to tests UNIX domain socket to TCP forwarding
> and ssh-add/agent can't do this.

Perhaps we should rely on OpenBSD netcat and skip tests if GNU netcat is
found. Something like this?

From 9e3fb5105317a4d64ea3d7285f86fa66af623761 Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@xxxxxxxx>
Date: Fri, 25 Jul 2014 08:26:17 +0200
Subject: [PATCH 1/1] skip multiplex.sh if nc does not support UNIX domain
 sockets

---
 regress/multiplex.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/regress/multiplex.sh b/regress/multiplex.sh
index 693211b..45480eb 100644
--- a/regress/multiplex.sh
+++ b/regress/multiplex.sh
@@ -6,7 +6,10 @@ CTL=/tmp/openssh.regress.ctl-sock.$$
 tid="connection multiplexing"
 
 if have_prog nc ; then
-	if nc -h 2>&1 | grep -- -N >/dev/null; then
+	if nc -h 2>&1 | grep -- -U >/dev/null; then
+		echo "skipped (netcat does not support UNIX domain sockets)"
+		exit 0
+	else if nc -h 2>&1 | grep -- -N >/dev/null; then
 		NC="nc -N";
         else
                 NC="nc"
-- 
main(a){char*c=/*    Schoene Gruesse                         */"B?IJj;MEH"
"CX:;",b;for(a/*    Chris           get my mail address:    */=0;b=c[a++];)
putchar(b-1/(/*               gcc -o sig sig.c && ./sig    */b/42*2-3)*42);}

Attachment: signature.asc
Description: PGP signature

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux