Package: ckermit Version: 211-15 Severity: normal This build of ckermit can't open ptys. If you try, you just get a blank line (not even an error!).
(/home/mdw/) C-Kermit>pty true (/home/mdw/) C-Kermit> What's going on? strace says: write(1, "\n", 1) = 1 open("/dev/ptym/clone", O_RDWR) = -1 ENOENT (No such file or directory) open("/dev/ptc", O_RDWR) = -1 ENOENT (No such file or directory) open("/dev/pty", O_RDWR) = -1 ENOENT (No such file or directory) stat("/dev/ptyp0", 0x7fffef997bc0) = -1 ENOENT (No such file or directory) write(1, " \n", 2) = 2 It's right: I don't have any of those. There's a build option HAVE_PTMX which turns on the SysV pty machinery, but the linux+shadow+pam target doesn't have this. Hacking the debian/rules file to force it on makes a binary which segfaults when kermit tries to allocate a pty. (It doesn't break on 32-bit machines.) What's going on? The ptsname function is being declared implicitly, as returning a (32-bit, signed) int, which is then sign-extended to a pointer by the (explicit, wrong) cast in ckupty.c. Oops. This patch fixes the problem for me. This bug isn't present in testing, but it would be nice to have it fixed in any updates to stable. diff --git a/ckupty.c b/ckupty.c index 705914c..8fe492a 100644 --- a/ckupty.c +++ b/ckupty.c @@ -47,6 +47,8 @@ . HP-UX 8.00 and earlier (no vhangup or ptsname routines) */ +#define _XOPEN_SOURCE +#include <stdlib.h> #include "ckcsym.h" #include "ckcdeb.h" /* To pick up NETPTY definition #*/ diff --git a/debian/rules b/debian/rules index e9faea2..8a7e6c4 100755 --- a/debian/rules +++ b/debian/rules @@ -12,7 +12,7 @@ BUILDDIR=`pwd`/debian/ckermit CFLAGS = -g -DCK_SYSINI=\\\"/etc/kermit/kermrc\\\" \ -DIKSDCONF=\\\"/etc/kermit/iksd.conf\\\" \ -DOPENSSL_097 -DCK_INI_B -DTIMEH -DCK_SOCKS \ - -DX509_SUBJECT_ALT_NAME_TO_USER + -DHAVE_PTMX -DX509_SUBJECT_ALT_NAME_TO_USER ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 -- System Information: Debian Release: 6.0.4 APT prefers stable APT policy: (990, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 (SMP w/8 CPU cores) Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages ckermit depends on: ii debconf [debconf-2.0] 1.5.36.1 Debian configuration management sy ii libc6 2.11.3-2 Embedded GNU C Library: Shared lib ii libncurses5 5.7+20100313-5 shared libraries for terminal hand ii libpam0g 1.1.1-6.1+squeeze1 Pluggable Authentication Modules l ii libsocks4 4.3.beta2-16 SOCKS libraries Versions of packages ckermit recommends: pn openbsd-inetd | inet- <none> (no description available) ii openssh-client [ssh-c 1:5.5p1-6+squeeze1 secure shell (SSH) client, for sec ckermit suggests no packages. -- debconf information: ckermit/iksd-anon: false ckermit/iksd-no-inetd: ckermit/iksd-anondir: /home/ftp ckermit/iksd: false -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org