NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/54971: sockstat command output incorrect for normal user
>Number: 54971
>Category: bin
>Synopsis: sockstat command output incorrect for normal user
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Feb 16 17:05:00 +0000 2020
>Originator: scole_mail
>Release: NetBSD 9.0
>Organization:
none
>Environment:
NetBSD dstar.dstar.net 9.0 NetBSD 9.0 (GENERIC) #0: Sat Feb 15 16:24:46 PST 2020 scole%dstar.dstar.net@localhost:/home/scole/nbsd/cvs/9_0/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
I just installed 9.0 and noticed that the sockstat command doesn't list
the PROTO, LOCAL ADDRESS, and FOREIGN ADDRESS columns anymore for
non-root users:
scole@dstar:~> sockstat
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
scole asclock-cl 72 3 dgram - /var/run/log
scole xterm 73 3 dgram - /var/run/log
root rpc.lockd 96 3 dgram - /var/run/log
root rpc.lockd 96 4 dgram - /var/run/log
root rpc.lockd 96 5 dgram - /var/run/log
root rpc.lockd 96 6 dgram - /var/run/log
root rpc.lockd 96 8 dgram - /var/run/log
Is there another command that can be used to list the user's own open
sockets?
I see "netstat -a" is close to what I'm looking for, just to see what
socket descriptor is being used for ssh-agent:
scole@dstar:~> netstat -a | grep ssh
tcp 0 0 *.ssh *.* LISTEN
tcp6 0 0 *.ssh *.* LISTEN
ffff92f5866e7e40 stream 0 0 ffff92f55c154820 0 00 /tmp/ssh-FV4dngWYCsl0/agent.801
but there is no user associated with the open socket.
Also, it is also confusing that sockstat is displaying bogus info
scole@dstar:~> sockstat |grep ssh-a
scole ssh-agent 397 3 dgram - /var/run/log
for the last 3 columns. It seems like it should print out '-' or
nothing if it can't access the data to display accurately.
Thanks
>How-To-Repeat:
Run sockstat command on 9.0 machine as a normal user
>Fix:
Home |
Main Index |
Thread Index |
Old Index