sshd 3.9p1 under Reliant Unix 5.45: getpeername: Operation not supported on transport endpoint

Robert Dahlem Robert.Dahlem at gmx.net
Sun Aug 29 04:03:50 EST 2004


On Sat, 28 Aug 2004 09:34:28 +0200, Robert Dahlem wrote:

>>> 	sock_in = sock_out = fcntl(STDIN_FILENO, F_DUPFD, 0);

>>It looks like your dup() is indeed broken. It should be too hard to 
>>have a replacement function (or #define) to transparently cope with 
>>this.

>>What is your platform type, as reported after "Host: " at the end of a
>>configure run?

>Host: mips-sni-sysv4

I tried to write a small program to reproduce the behaviour for the 
ReliantUnix maintenance people but failed until yet.

Basically it look's to me like:

	newsock=accept(...);
	dup2(newsock, STDIN_FILENO);
	dup2(STDIN_FILENO, STDOUT_FILENO);
	execv(...);

	/* exec'ed program */
	sock_in = sock_out = dup(STDIN_FILENO);
	getpeername(sock_in);					/* bang */

Damien, it guess re-exec is your code: could you give me a pointer to 
what re-exec does to this fd beside the obvious?

Regards,
        Robert






More information about the openssh-unix-dev mailing list