From owner-freebsd-ports@FreeBSD.ORG Mon May 23 20:21:18 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B61DA1065670 for ; Mon, 23 May 2011 20:21:18 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 44A1D8FC1C for ; Mon, 23 May 2011 20:21:17 +0000 (UTC) Received: by bwz12 with SMTP id 12so7087596bwz.13 for ; Mon, 23 May 2011 13:21:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=hj35BgU6k2EFMG4znVP/JsuivKHEh4rbIF1aHl+8R8Q=; b=Tv6rdGwQrXPbdYb9nzbFTRxbzXADF2ZDeCD7RZQAU6vSGPiAEp/GL1KvzvzBBUVH6R LV41AgqXjwBT3IEg3hejeN0RASqvJfjznRc1LZqftY3sLlBHJAkj9zgDQZoOZy2HrWKV LEfJ/YXs+yQOX/MCYpf4IGaLawGnGMHxYP9KI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; b=Hw3dkKPo6ZboGmnyw6w3LEAilJ6WHGDb2WHejeJQBfSmneL1dOvHDt7/YJUVabJAUK vfodbCzchp+JAjYCAxNlv/dqnndU7/MBg/CR7wCh+RKx6v3IhPvdS6ilIZhodC6I+vzp qQQgK6y5Nhk+4vYpCSuddQnovupg8bbhNpXVA= Received: by 10.204.141.12 with SMTP id k12mr1360bku.44.1306182077093; Mon, 23 May 2011 13:21:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.205.65.198 with HTTP; Mon, 23 May 2011 13:20:47 -0700 (PDT) In-Reply-To: <20110523085030.GJ59496@hoeg.nl> References: <20110522205003.GH59496@hoeg.nl> <20110523085030.GJ59496@hoeg.nl> From: Chris Rees Date: Mon, 23 May 2011 21:20:47 +0100 Message-ID: To: Ed Schouten Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-ports@freebsd.org Subject: Re: Utmpx usage X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: utisoft@gmail.com List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 20:21:18 -0000 On 23 May 2011 09:50, Ed Schouten wrote: > * Chris Rees , 20110523 10:40: >> I've been perusing the linux manpage for utmp, and noticed that login and >> getty deal with utmp for logins, and It's only init's job to deal with >> logouts. Since runit is an init replacement, this makes perfect sense. > > Yeah; it probably acts as a safety belt for misbehaving tools that > forget to write logout records. On FreeBSD logout records are written by > pam_lastlog(8), making that logic in init(8) superfluous. > > You could consider calling getutxline() in a loop to obtain the ut_ids > for a specific TTY. > Well, since I'm not going to maintain a fork of this, I'm going to remove the code. The code in our init for the same function: static void clear_session_logs(session_t *sp __unused) { /* * XXX: Use getutxline() and call pututxline() for each entry. * Is this safe to do this here? Is it really required anyway? */ } so I think I'll blank it! Thanks, and sorry for taking us down a long and pointless avenue. Chris