From owner-freebsd-hackers Wed Apr 23 02:29:52 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id CAA19076 for hackers-outgoing; Wed, 23 Apr 1997 02:29:52 -0700 (PDT) Received: from staff.psinet.net.au (adrian@staff.psinet.net.au [203.62.152.38]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id CAA19071 for ; Wed, 23 Apr 1997 02:29:48 -0700 (PDT) Received: from localhost (adrian@localhost) by staff.psinet.net.au (8.8.5/8.7.3) with SMTP id RAA04255; Wed, 23 Apr 1997 17:28:27 +0800 Date: Wed, 23 Apr 1997 17:28:27 +0800 (WST) From: Adrian Chadd To: Alex Belits cc: freebsd-hackers@freebsd.org Subject: Re: Best way to hook into user logins / logouts ? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > For what I'm working on I need to hook into when users login and logout. > > The "best" way I can find currently is hooking into the wtmp updates in > > libc (especially for the logouts), does anyone know any better ways? > > That will be completely broken for xterm. Actually it all depends on > what "login" is, and for all imaginable needs you can use /etc/profile > or wrapper as user shell (and defined in /etc/shells) that exec's real > shell. Logging in is easy (I was thinking /etc/profile :) the thing is when people logout .. I have some people on this box with real shells (admins), and I have others with slip, others with ppp, and others with remote logins into a shell machine. I'd rather hack one thing than hack lots (and have to keep hacking everytime we add something new:) Adrian.