OpenSSH 2.4?

Lutz Jaenicke Lutz.Jaenicke at aet.TU-Cottbus.DE
Mon Feb 5 03:20:58 EST 2001


On Sun, Feb 04, 2001 at 11:51:02AM +0100, Gert Doering wrote:
> On Sat, Feb 03, 2001 at 04:57:30PM -0600, mouring at etoh.eviladmin.org wrote:
> > > > > Don't forget the test -S problem.
> > > > 
> > > > Just tried openssh_cvs "up-to-date" on SCO 3.2v4.2, and "test -S" is still
> > > > there... (configure redone by "autoconf" after "cvs update -d").
> > 
> > No one has given me an acceptable replace for 'test -S'... So I'm not
> > personally inclined to muck with it.=)
> 
> There is no portable way to do an "is this a socket?" test - there are
> quite a number of systems that do not have unix sockets, and thus no way
> to do "test -S".
> 
> One *could* do something like 
> 
>   if test -f $socket
>   then
>       if [ "`ls -l $socket | cut -c1`" = "s" ] ; then
> 	   echo "socket found"
>       fi
>   fi
> 
> but that's ugly as hell (and I'm sure it's not portable to some other
> system).
> 
> Hmmm.  One could run a test program in C to see "is this a socket, and
> is there egd running on it", that would be even better...

On the OpenSSL list we were just tracking down a similar problem. In this
case we were struggling with Unixware 7 (I already fighted against it
for PRNGD):
It seems that Unixware 7 supports sockets; these are however flagged as
FIFOs in the filesystem (prwx...). Doesn't make things easier, does it?
You cannot distinguish them from the filesystem point of view, so using
a test program to connect() to it might be the only way to find out...

Best regards,
	Lutz
-- 
Lutz Jaenicke                             Lutz.Jaenicke at aet.TU-Cottbus.DE
BTU Cottbus               http://www.aet.TU-Cottbus.DE/personen/jaenicke/
Lehrstuhl Allgemeine Elektrotechnik                  Tel. +49 355 69-4129
Universitaetsplatz 3-4, D-03044 Cottbus              Fax. +49 355 69-4153





More information about the openssh-unix-dev mailing list