The attached patch fixes VTE bugster bug #6430930 and bugzilla bug 
#488960.  Arvind Samptur and Rajan Singh from Wipro wrote this patch
for Solaris 10 and forward ported it to the 2.22 codebase.  They
asked me to integrate it into the vermillion builds since the patch
is slow to be accepted by the upstream VTE maintainer.

Brian

----

Please describe the problem:
When closing a gnome-terminal window, if it is not the last window to be
closed, the utmpx file can be left with stale information in it. The
"who" command will still report the user against the pts terminal.

For example:
# who
root       console      May 25 16:46
test1      dtremote     May 25 16:47    (beefy:0)
test1      pts/3        May 25 16:53    (beefy:0.0)
test1      pts/4        May 25 16:53    (beefy:0.0)
(pts/3 and pts/4 represent two gnome-terminal windows, with a common pid)

After the pts/4 window is closed
# who
root       console      May 25 16:46
test1      dtremote     May 25 16:47    (beefy:0)
test1      pts/3        May 25 16:53    (beefy:0.0)
test1      pts/4        May 25 16:53    (beefy:0.0)

The pts/4 entry still persists, but the terminal line is available for
re-use.  If a second user runs a gnome-terminal and is assigned pts/4 by
the system, it fails to update the utmpx because of the existing record
for the previous user, and thus operations which use the terminal line
to work out the login name of the user (like password changing) do not
work correctly.


Steps to reproduce:
1. launch 2 instances of gnome-terminal (with user say test1)
2. Close one of these
3. Launch one more instance as different user (say test2)
4. Try to change the password
    $ passwd


Actual results:
User test2 will not be allowed to change the password. Will get an error
message saying that it is trying to change password for user test1 and
the operation is not permitted.

Expected results:
User test2 should be able to change its password.

Does this happen every time?
This happens intermittently.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vte-01-update-utmpx.diff
URL: 
<http://mail.opensolaris.org/pipermail/jds-review/attachments/20080415/8e7006ca/attachment.ksh>

Reply via email to