Bug 102016 - account name too long, breaks ps
account name too long, breaks ps
Status: CLOSED RAWHIDE
Product: Red Hat Linux Beta
Classification: Retired
Component: dbus (Show other bugs)
beta1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Havoc Pennington
: Triaged
Depends On:
Blocks: CambridgeTarget
  Show dependency treegraph
 
Reported: 2003-08-08 17:59 EDT by Chris Ricker
Modified: 2007-04-18 12:56 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-10-17 12:13:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Chris Ricker 2003-08-08 17:59:22 EDT
dbus-daemon-1 runs as user 81, messagebus

Because messagebus is 10 chars long, it breaks ps output slightly, which shows
it as UID rather than name:

[cricker@yoshimi cricker]$ ps -ef | grep ^81
81        2918     1  0 12:00 ?        00:00:00 dbus-daemon-1 --system
[cricker@yoshimi cricker]$

Any reason this account can't be named msgbus instead? Or dbus? Or something
else <= 8 chars?
Comment 1 Havoc Pennington 2003-08-08 18:19:29 EDT
we could just fix ps... seems lame to modify this for that reason.
Comment 2 Chris Ricker 2003-08-08 18:24:40 EDT
Oh sure, but ps is hardly the only tool which assumes 8-char usernames. They
mostly work these days, but there's still enough stupid stuff like this that if
they can reasonably be avoided, I'd think they should be....
Comment 3 Chris Ricker 2003-08-08 18:25:44 EDT
Sorry, by "they" I meant "account names over 8 characters long" -- I gotta start
reading what I write before I click commit ;-)
Comment 4 Alexander Larsson 2003-08-09 08:37:45 EDT
Well, ps uses uid instead of cutting off the name to make it fit into a column.
How would you fix that? changing the column output of ps can break lots of scripts.
Comment 5 Havoc Pennington 2003-08-09 09:41:39 EDT
Scripts assume the column width or the column separator?

I guess we can change to "mesgbus" or something like that, you're right it 
probably breaks something to be longer. 
Comment 6 Chris Ricker 2003-08-09 10:24:36 EDT
some scripts assume one, some the other....

I think the only "fix" which would be possible for ps would be what top and some
of the other tools do -- just truncate to 8 characters anything longer. That's
not really ideal though either, and might also break scripts

Avoiding it when possible and leaving ps alone is probably sanest
Comment 7 Alexander Larsson 2003-08-11 02:28:06 EDT
truncate the name? That would break all tools extracting the name and using it.
Currently they get the uid instead if the name would be truncated, and most apps
accept uids instead of usernames. Truncating would break that.
Comment 8 Chris Ricker 2003-10-17 12:13:36 EDT
Closing fixed, thanks

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