Bug 156768

Summary: [patch] sockstat(1): missing spaces between long fields in output
Product: Base System Reporter: Alter <alter>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Only Me CC: demon, lukasz
Priority: Normal Keywords: patch
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff
none
Always print space after procname none

Description Alter 2011-05-02 17:00:19 UTC
FD field is too narrow. Space between columns may be missing if we have too large value.

Fix: http://alter.org.ua/soft/fbsd/sockstat/fbsd72.sockstat.20110501.patch.gz

Patch attached with submission follows:
Comment 1 Alter 2012-06-14 15:34:25 UTC
Hello bug-followup,

unified diff is now available at
http://alter.org.ua/soft/fbsd/sockstat/fbsd72.sockstat.20120614u.patch.gz

-- 
Best regards,
 Alter                          mailto:alter@alter.org.ua
Comment 2 Lukasz Wasikowski 2013-06-30 14:32:11 UTC
Hi,

Could anyone look into this issue? sockstat output can't be used
reliably in some cases - ie. rkhunter misses lines like this:

teamspeak teamspeak_25690 18 tcp4   a.b.c.d:30033    *:*

-- 
best regards,
Lukasz Wasikowski
Comment 3 Dmitry Sivachenko freebsd_committer freebsd_triage 2014-08-04 10:22:22 UTC
Created attachment 145337 [details]
Always print space after procname

I suggest at least the attached fix: limit username to 8 characters not to break formatting for long usernames and (more important) to always print at least one space after procname, otherwise for long procname sticks to PID and this makes mahines parsing impossible:

transmission transmissi813 9 tcp4   *:9091                *:*
Comment 4 Lukasz Wasikowski 2014-08-14 09:26:03 UTC
(In reply to Dmitry Sivachenko from comment #3)
> Created attachment 145337 [details]
> Always print space after procname
> 
> I suggest at least the attached fix: limit username to 8 characters not to
> break formatting for long usernames and (more important) to always print at
> least one space after procname, otherwise for long procname sticks to PID
> and this makes mahines parsing impossible:
> 
> transmission transmissi813 9 tcp4   *:9091                *:*

This patch works for me, thank you!
Comment 5 Eitan Adler freebsd_committer freebsd_triage 2018-05-20 23:53:20 UTC
For bugs matching the following conditions:
- Status == In Progress
- Assignee == "bugs@FreeBSD.org"
- Last Modified Year <= 2017

Do
- Set Status to "Open"
Comment 6 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:40:54 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>