From owner-freebsd-security Fri Oct 6 7: 1:45 2000 Delivered-To: freebsd-security@freebsd.org Received: from sentinel.office1.bg (sentinel.office1.bg [195.24.48.182]) by hub.freebsd.org (Postfix) with SMTP id B628537B502 for ; Fri, 6 Oct 2000 07:01:41 -0700 (PDT) Received: (qmail 6609 invoked by uid 1001); 6 Oct 2000 14:00:34 -0000 Date: Fri, 6 Oct 2000 17:00:34 +0300 From: Peter Pentchev To: Drew Derbyshire Cc: security@FreeBSD.ORG Subject: Re: sockstat (was Re: cvs commit: src/etc inetd.conf) Message-ID: <20001006170034.D232@ringwraith.office1.bg> References: <39D93044.8B0C4E69@ursine.com> <20001006153343.B232@ringwraith.office1.bg> <002101c02f99$a04b6010$94cba8c0@hh.kew.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <002101c02f99$a04b6010$94cba8c0@hh.kew.com>; from software@kew.com on Fri, Oct 06, 2000 at 09:30:43AM -0400 Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Fri, Oct 06, 2000 at 09:30:43AM -0400, Drew Derbyshire wrote: > > And to paraphrase an earlier comment by DES, > > "Funny way to say sockstat | fgrep '*.*'" :) > > Urp! > > sockstat seems to truncate port numbers on the FOREIGN ADDRESS under 4.1 > release ... Almost true - sockstat trims *both* local and foreign addresses to 20 chars each. However, in the case discussed, the issue was listening ports, which are in most cases bound to '*.portno' locally and always show '*.*' as foreign address. [3 minutes of source browsing] Uhm.. correction :) sockstat trims local and foreign addresses to 20 chars each, but netstat (which sockstat invokes), when invoked with -Aan (which is how sockstat invokes it), trims local and foreign addresses to 18 chars each to fit all the info on one line :( So the problem is with netstat, or rather with sockstat's usage of -A to get the socket control block address, to link it with fstat's output later. G'luck, Peter -- .siht ekil ti gnidaer eb d'uoy ,werbeH ni erew ecnetnes siht fI To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message