From nobody@FreeBSD.org  Wed Sep 28 06:18:02 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 60A6C16A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 28 Sep 2005 06:18:02 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 2630E43D49
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 28 Sep 2005 06:18:02 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j8S6I1b5012014
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 28 Sep 2005 06:18:02 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j8S6I1YD011986;
	Wed, 28 Sep 2005 06:18:01 GMT
	(envelope-from nobody)
Message-Id: <200509280618.j8S6I1YD011986@www.freebsd.org>
Date: Wed, 28 Sep 2005 06:18:01 GMT
From: "Jukka A. Ukkonen" <jau@iki.fi>
To: freebsd-gnats-submit@FreeBSD.org
Subject: xterm-205 fails to write utmp entries for normal users
X-Send-Pr-Version: www-2.3

>Number:         86663
>Category:       ports
>Synopsis:       xterm-205 fails to write utmp entries for normal users
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    krion
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 28 06:20:17 GMT 2005
>Closed-Date:    Wed Sep 28 14:20:35 GMT 2005
>Last-Modified:  Wed Sep 28 14:20:35 GMT 2005
>Originator:     Jukka A. Ukkonen
>Release:        4.11-STABLE
>Organization:
private citizen
>Environment:
FreeBSD mjolnir 4.11-STABLE FreeBSD 4.11-STABLE #0: Wed Sep 21 07:56:19 EET DST 2005     jau@mjolnir:/home/src/sys/compile/Mjolnir  i386
>Description:
        Xterm-205 seems to write the utmp entries just fine when I
use the identity of root to start a new xterm.
When the xterm window starts with normal user rights it fails
to update utmp even though the xterm binary is suid root.
 
Could this be a sign that xterm drops the suid root access
a bit too early returning to the real uid before it has had
a chance to modify utmp?

The result does not change by adding +ut/-ut on the command
line. Except of course that even root then does not get an
entry in utmp.
So, this is not simply a reversed default value for a flag.


>How-To-Repeat:
      Install xterm-205 and launch a new xterm. Check the /var/run/utmp
contents (simple who will do fine) to notice that the entry for the new
terminal session is missing.

>Fix:
      Probably easily fixed by moving the code which drops root suid rights
a bit later in the code.
This is also why I classified this high/serious. The problem is probably easy
and quick to fix. OTOH its implications to system management can be very harmful.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->krion 
Responsible-Changed-By: barner 
Responsible-Changed-When: Wed Sep 28 07:09:38 GMT 2005 
Responsible-Changed-Why:  
Over to maintainer.  GNATS: Enter the reason for changing this PR's 
responsible here.  GNATS: Lines beginning with "GNATS:" will be deleted. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=86663 
State-Changed-From-To: open->closed 
State-Changed-By: krion 
State-Changed-When: Wed Sep 28 14:19:42 GMT 2005 
State-Changed-Why:  
I fixed it temporary for 205 until the problem is solved by xterm developers. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=86663 
>Unformatted:
