Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 53977 - Openssh server utmp handling with large pts values (ut_line size is 7+ chars)
Summary: Openssh server utmp handling with large pts values (ut_line size is 7+ chars)
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Daniel Ahlberg (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-15 07:47 UTC by Antanas Kompanas
Modified: 2004-08-05 23:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
line name buffer size fix (loginrec-linesize.patch,309 bytes, patch)
2004-06-15 07:52 UTC, Antanas Kompanas
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antanas Kompanas 2004-06-15 07:47:22 UTC
Since kernel 2.6.? pts numbers are allocated sequncially instead of first free. This way it is easy for pts numbers to go as high as 1000 and up. This makes a short pts names (e.g. "pts/1000") 8 chars long. In syslogin_preform_logout() function of openssh (loginrec.c) a variable of length 8 is allocated to hold ut_line value and thus long pts lines get truncated resulting in "login() returned error result" errors and /var/run/utmp filled with stale records.

It appears that in openssh-3.8.1_p1-r1 this bug is fixed. Unfortunately it is marked unstable. Additionally, many users may be still using openssh-3.7.1_p2-r2.

The patch that I will attach is one-liner that fixes this issue and applies to both openssh-3.8_p1 and openssh-3.7.1 which both have ebuilds currently marked as stable.

As an alternative, any of openssh-3.8.1 could be marked as stable (if it is).
Comment 1 Antanas Kompanas 2004-06-15 07:52:54 UTC
Created attachment 33312 [details, diff]
line name buffer size fix

This is the patch described earlier. It ports the fix to line size buffer
available in 3.8.1p1 to 3.8p1 and 3.7.1p2.
Comment 2 Daniel Ahlberg (RETIRED) gentoo-dev 2004-08-05 17:38:23 UTC
Most arches is marked stable for >=3.8.1.
Comment 3 Antanas Kompanas 2004-08-05 23:46:50 UTC
Now they are, of course.