🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by DAVID NEWALL Tue, 18 Oct 1988 11:44
Bug in ps -f
#878
Author: DAVID NEWALL
Date: Tue, 18 Oct 1988 11:44
31 lines
1944 bytes
I have discovered a bug in System V Unixes.  Under certain circumstances,
ps -f displays "junk" in the login name field.  This bug exists on our NCR
Tower 32/600's which are running NCR OS 01.03.02 (Unix V.2) and also on my
Stride 440 (Unix/68 V.1).  This does not appear to be a problem in BSD4.2
- at least, the bug does not occur on our Sun 3/60's (SUNOS 3.2).

This bug occurs when a logged in user has a login name which is 8 characters
long (could be longer; I haven't checked), and when the entry in /etc/passwd
that follows that user's has a user number greater than 256.

The "junk" that is displayed is the user's login name followed by the next
user's user number mod 256 (as a character) followed by that (second) user's
login name.  Similarly for third and subsequent lines.

For example:

        $ who am i
        user1234
        $ tail -3 /etc/passwd
        user1234:likjlasdfSDF:100:100:User 1234:/usr/1234:/bin/sh
        user2345:89kkakkik2kH:321:100:User 2345:/usr/2345:/bin/sh
        user3456:jKLJD983.8Hs:322:100:User 3456:/usr/3456:/bin/sh
        $ ps -f
            UID   PID  PPID  C           TTY  TIME COMMAND
        user1234Auser2345Buser3456 14165     1  2 15:54:52   05  0:03 sh
        user1234Auser2345Buser3456 14166 14165  0 15:54:57   05  0:00 ps -f

David Newall                     Phone:  +61 8 343 3160
Unix Systems Programmer          Fax:    +61 8 349 6939
Academic Computing Service       E-mail: ccdn@levels.sait.oz.au
SA Institute of Technology       Post:   The Levels, South Australia, 5095
Re: Bug in ps -f
#880
Author: Paul De Bra
Date: Thu, 20 Oct 1988 19:51
23 lines
1520 bytes
In article <533@levels.sait.edu.au> ccdn@levels.sait.edu.au (DAVID NEWALL) writes:
>I have discovered a bug in System V Unixes.  Under certain circumstances,
>ps -f displays "junk" in the login name field.  This bug exists on our NCR
>...
>        $ ps -f
>            UID   PID  PPID  C           TTY  TIME COMMAND
>        user1234Auser2345Buser3456 14165     1  2 15:54:52   05  0:03 sh
>        user1234Auser2345Buser3456 14166 14165  0 15:54:57   05  0:00 ps -f
>

As far as I know this bug extremely old. The reason some programs show this
bug is that the internal representation of user names is done with an
8-character array. This means that usernames consisting of 8 characters are
not 0-terminated.

We worked around the problem by not allowing login names of more than 7
characters on any of our systems.

Paul.
-- 
-------------------------------------------------------------------------
|debra@research.att.com   | uunet!research!debra     | att!grumpy!debra |
-------------------------------------------------------------------------
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads