Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 202840

Summary: app-misc/ckermit-8.0.211-r2 cannot start a ssh session
Product: Gentoo Linux Reporter: Eric Lesage <erl-dev>
Component: Current packagesAssignee: Martin Jackson (RETIRED) <mjolnir>
Status: RESOLVED FIXED    
Severity: major    
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: ebuild which fixes the problem

Description Eric Lesage 2007-12-20 03:12:33 UTC
ckermit (kermit) cannot spawn ssh, reporting
"No such file or directory" altough no file
or directory appears related.


Reproducible: Always

Steps to Reproduce:
$ kermit
> ssh myhost

Actual Results:  
: No such file or directory

Expected Results:  
Kermit should use be able to swawn ssh to connect to the remote system.

This bug happens when kermit searches for a way to allocate a pseudoterminal.

On systems without the classical BSD ptys (kernel option), this needs the /dev/ptmx device and a call to grantpt. Unfortunately the ckermit is set not
to try this method unless it can first find grantpt in /usr/include/stdlib.h
(using a grep!); only then does it check for the presence of /dev/ptmx and
configures itself for either classical ptys or the UNIX98 ptys.

On amd64 systems, this does not work because of the multilib setup
(/usr/include/stdlib.h is almost empty).

I'll be attaching a ebuild which fixes the makefile.


Second problem: when using /dev/ptmx, kermit uses the ptsname system function.
However this function is not declared in stdlib.h unless _XOPEN_SOURCE or _GNU_SOURCE are defined. Therefore the wrong prototype is assumed, and the
pointer returned is truncated to 32 bits. So the included ebuild patches
the makefile to define _XOPEN_SOURCE and _BSD_SOURCE (then required for the CRTSCTS define).
Comment 1 Eric Lesage 2007-12-20 03:13:53 UTC
Created attachment 138945 [details]
ebuild which fixes the problem

Ugly, but works (tested here).
Comment 2 Martin Jackson (RETIRED) gentoo-dev 2007-12-22 14:55:19 UTC
Committed, thanks.  SSH still works on x86 with this setup, too!