From owner-freebsd-hackers Sun Oct 11 17:50:54 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA14545 for freebsd-hackers-outgoing; Sun, 11 Oct 1998 17:50:54 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from rucus.ru.ac.za (rucus.ru.ac.za [146.231.29.2]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id RAA14513 for ; Sun, 11 Oct 1998 17:50:30 -0700 (PDT) (envelope-from nbm@rucus.ru.ac.za) Received: (qmail 25053 invoked by uid 1003); 12 Oct 1998 00:50:16 -0000 Message-ID: <19981012025016.A23475@rucus.ru.ac.za> Date: Mon, 12 Oct 1998 02:50:16 +0200 From: Neil Blakey-Milner To: Alfred , hackers@FreeBSD.ORG Subject: Re: need "no kludge" solution for socket->uid mapping References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: ; from Alfred on Sat, Oct 10, 1998 at 05:55:52PM -0400 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat 1998-10-10 (17:55), Alfred wrote: > i'm trying to code a threaded ident server > (yes i know one already exists) > however i'm finding the way that socket->uid mappings are done to be VERY > UGLY(tm) unless i cheat :) > > then it gets worse when i try to find what port the socket is actually > bound to. I'm not sure if this helps, but take a look at the lsof code, it does all sorts of fun things, which you can limit to specific ports, and things like that. ie, if I wanted to know who was using port 3400, I'd do: lsof -i :3400 and it'd return something like... irc-4.4 1291 bvi 4u inet 0xf77aede0 0t0 TCP xxxx:3400->yyyy:6667 Neil -- Neil Blakey-Milner nbm@rucus.ru.ac.za To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message