OpenSSH_4.3p2 fails to create a pty session

Darren Tucker dtucker at zip.com.au
Fri Aug 18 08:15:44 EST 2006


Eric Millbrandt wrote:
> Darren Tucker wrote:
>>> debug3: mm_request_send entering: type 26
>>> mm_send_fd: sendmsg(4): Bad file descriptor
>>>     
>>
>> I'm not sure if the "Bad descriptor" error refers to the descriptor
>> being sent or the descriptor over which it is sent.  I suspect the former
>> otherwise sshd would have bailed much sooner.
>>   
> OK, so here is what sshd is using.
> 
> openpty returned 0 descriptors 4/6 name /dev/ttyp3
> debug3: mm_request_send entering: type 26
> lsof me now! (pid 48051, sock 5, fd 4)
[...]
> sshd    48051 root    4u  VCHR                6,3      0t0    729 
> /dev/ptyp3
> sshd    48051 root    5u  unix 0xfffffe0013b8df80      0t0        
> ->0xfffffe0013b91100
> sshd    48051 root    6u  VCHR                5,3      0t0    728 
> /dev/ttyp3
> 
> Looks ok to me.  Am I missing something?

Looks OK to me too.  The problem appears to be in the descriptor passing 
but I'm not sure why.  What are HAVE_SENDMSG, HAVE_ACCRIGHTS_IN_MSGHDR, 
HAVE_CONTROL_IN_MSGHDR set to in config.h?

You may be able to work around the problem by disabling 
UsePrivilegeSeparation in sshd_config.  Also, does disabling UsePAM make 
any difference?

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
     Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.



More information about the openssh-unix-dev mailing list