Commit Graph

35 Commits

Author SHA1 Message Date
ozaki-r 1fc70a0860 Adjust userland commands for struct inpcb integration
Only kvm users are affected.
2022-10-28 05:24:07 +00:00
rillig 0298690d03 sockstat: fix undefined behavior when calling ctype functions
lint says: warning: argument to 'function from <ctype.h>' must be cast
to 'unsigned char', not to 'unsigned int' [342]
2021-08-27 18:09:30 +00:00
christos a09dcfa2d4 undo previous, now sockstat works without privs 2020-08-26 22:57:55 +00:00
christos 63457cef70 turn on fortify since it is setgid (from scole_mail) 2020-08-25 16:39:16 +00:00
christos 0f41c159c4 RR/54971: scole_mail: sockstat command output incorrect for normal
user As the PR hints, it is not enough to have kern.expose_address=1
to see kernel addresses, we also need to have the PK_KMEM bit set
which we achieve by installing sockstat setgid kmem and opening
and closing /dev/mem. (/usr/src/sys/kern/kern_proc.c:311). It is
unfortunate that we need to give the program more privilege, to
prove to the kernel that we have the privilege to see the data.
2020-08-25 14:05:17 +00:00
kamil 774dcce2f6 sockstat: Add indirection of symbols to remove clash with sanitizers
Add indirection and symbol renaming under MKSANITIZER for the linked in
version of sysctlgetmibinfo and sysctlnametomib.
2019-08-18 04:13:24 +00:00
mrg fbffadb9f8 - add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
  this case, and thus can't be marked __dead easily
2019-02-03 03:19:25 +00:00
christos 31ed49d544 don't do _KERNEL; hides bswap stuff. 2017-01-14 01:01:48 +00:00
christos ea36f744b3 fix compilation 2017-01-12 18:52:15 +00:00
riastradh 6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
wiz a5684d07dd Use Mt for email addresses. 2013-07-20 21:39:55 +00:00
manu ed3e0293c8 Document that localsocket may be of type SOCK_SEQPACKET 2011-05-29 04:54:45 +00:00
manu 1b0d8e317f Display SOCK_SEQPACKET local sockets in sockstat and netstat 2011-05-29 04:45:08 +00:00
pooka 6475f12521 support rump.sockstat 2011-01-28 18:52:48 +00:00
lukem 183f6d8af1 Fix WARNS=4 issues (-Wshadow -Wsign-compare) 2009-04-13 10:56:56 +00:00
martin 637bc2e71d Move TNF licenses to 2 clause form 2008-05-04 19:43:05 +00:00
martin 3028e483e4 Convert to new 2 clause license 2008-04-29 06:53:00 +00:00
he a2decb9dc9 It's wrong for user-land programs to define _KERNEL before including
<sys/types.h>.  The reason is that this will break the build for about
half of our ports, because the wrong variant of e.g. bswap16() is being
defined and referenced (either __bswap16() or bswap16()).  Removing
the _KERNEL define restores buildability for this program.
2008-03-01 11:04:30 +00:00
ad f4b74daf98 +#define _KERNEL
+#include <sys/types.h>
+#undef _KERNEL
2008-02-27 16:37:31 +00:00
ad ea3f10f7e0 Merge more changes from vmlocking2, mainly:
- Locking improvements.
- Use pool_cache for more items.
2007-12-26 16:01:34 +00:00
peter 49e6c2a1db Document the option -n and bump date. 2006-07-14 21:14:24 +00:00
wiz 17d58c1431 Argument is address_family, not "address family". From YOMURA Masanori in private mail. 2005-09-11 23:26:35 +00:00
rpaulo fcf2b555d7 If the specificed MIB doesn't exist, then it's probably a kernel without
that socket type (AF_INET, AF_INET6, etc.). That's a normal condition, so
don't bail out.

Reviewed by Andrew Brown.
2005-08-24 21:33:57 +00:00
rpaulo f16cc5d95a Don't break each name in the AUTHORS section. 2005-08-24 21:31:45 +00:00
rpaulo cccbf666c8 Query the v6 sockets only if USE_INET6 != "no". Patch provided by Jukka Salmi
on PR#30963.

ok atatat@
2005-08-10 20:32:57 +00:00
rpaulo 0459285527 Fix a typo in the islistening() routine. Patch provided by Jukka Salmi
on PR#30963.
2005-08-10 20:21:14 +00:00
lukem ef45472693 appease gcc -Wuninitialized 2005-06-02 03:00:19 +00:00
atatat 04274e4899 Don't allow the command length to mess up the formatting 2005-04-09 02:10:27 +00:00
peter c36f9da926 Fix a typo. 2005-03-22 15:51:35 +00:00
atatat 1a773e1da4 Fix printing of AF_LOCAL names. 2005-03-10 05:39:54 +00:00
kleink fcbd09f9f1 Field width and precision specifier arguments to printf must be ints. 2005-03-09 19:09:05 +00:00
wiz 73eb81183c Make Dd date match import date more closely. 2005-03-09 17:16:54 +00:00
wiz 0f7047cb0b Grammar improvements. 2005-03-09 17:16:30 +00:00
atatat 900e40a9ae almost forgot about this.
Optimize getting process information by not getting it again if you're
looking for the same pid.
2005-03-09 05:53:47 +00:00
atatat 724bd01950 Add a sockstat(1) command that can list open sockets and the processes
that own them.  The implementation concept and man page came largely
from FreeBSD, but the program is fresh.
2005-03-09 05:20:05 +00:00