Bug#243880: ssh: broken wtmp entries ("gone - no logout") for 2.6 kernels
Package: ssh
Version: 1:3.8p1-2
Severity: normal
Tags: patch
There is a bug in loginrec.c -- the "line" variable is declared too short
in syslogin_preform_logout() function.
Ssh truncates the pseudo-tty number, and every login with pts number
longer than 4 digits is marked as "gone - no logout" by "last"
command.
This was reported on OpenSSH list:
http://msgs.securepoint.com/cgi-bin/get/openssh-unix-dev-0404/23.html
Patch below.
-Karol
=[patch]================================================
--- loginrec.c.orig 2004-04-15 12:00:39.000000000 +0200
+++ loginrec.c 2004-04-15 12:04:24.000000000 +0200
@@ -1354,7 +1354,10 @@
syslogin_perform_logout(struct logininfo *li)
{
# ifdef HAVE_LOGOUT
- char line[8];
+# ifndef UT_LINESIZE
+# define UT_LINESIZE 8
+# endif
+ char line[UT_LINESIZE];
(void)line_stripname(line, li->line, sizeof(line));
=[patch]================================================
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.3-mm1
Locale: LANG=C, LC_CTYPE=pl_PL
Versions of packages ssh depends on:
ii adduser 3.52 Add and remove users and groups
ii debconf 1.4.21 Debian configuration management sy
ii dpkg 1.10.20 Package maintenance system for Deb
ii libc6 2.3.2.ds1-11 GNU C Library: Shared libraries an
ii libpam-modules 0.76-16 Pluggable Authentication Modules f
ii libpam-runtime 0.76-16 Runtime support for the PAM librar
ii libpam0g 0.76-16 Pluggable Authentication Modules l
ii libssl0.9.7 0.9.7d-1 SSL shared libraries
ii libwrap0 7.6-ipv6.1-3 Wietse Venema's TCP wrappers libra
ii zlib1g 1:1.2.1-5 compression library - runtime
-- debconf information excluded
Reply to: