Bug 66950 - Disappearing utmp entries.
Disappearing utmp entries.
Product: Red Hat Linux Beta
Classification: Retired
Component: util-linux (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2002-06-18 19:59 EDT by hjl
Modified: 2007-04-18 12:43 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-06-18 20:00:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
A patch (463 bytes, patch)
2002-06-18 20:00 EDT, hjl
no flags Details | Diff

  None (edit)
Description hjl 2002-06-18 19:59:54 EDT
login.c has code

        /* If we can't find a pre-existing entry by pid, try by line.
           BSD network daemons may rely on this. (anonymous) */
        if (utp == NULL) {
             ut.ut_type = LOGIN_PROCESS;
             strncpy(ut.ut_id, tty_number, sizeof(ut.ut_id));
             strncpy(ut.ut_line, tty_name, sizeof(ut.ut_line));
             utp = getutid(&ut);
The problem is getutid will seatch for entries with the matching
ut_id. However, it uses tty_number to match the ut_id. As the
result, if the second remote login will match the "1" entry in

1:2345:respawn:/sbin/mingetty tty1

You can see that by logging on console and rlogin twice to the same
machine. You won't see the user on console with

# who

The fix is to use getutline instead of getutid.
Comment 1 hjl 2002-06-18 20:00:28 EDT
Created attachment 61507 [details]
A patch
Comment 2 Elliot Lee 2002-06-20 15:02:27 EDT

Note You need to log in before you can comment on or make changes to this bug.