public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/11697] New: pt_chown doesn't work when the PTY's gid is already correct
@ 2010-06-11 19:11 glibcbugs0000 at cneufeld dot ca
  0 siblings, 0 replies; only message in thread
From: glibcbugs0000 at cneufeld dot ca @ 2010-06-11 19:11 UTC (permalink / raw)
  To: glibc-bugs

I upgraded from 2.7 to 2.11, and my terminals broke.  I've tracked it down to
pt_chown not doing what it is asked to do.  The git change:

commit 837dea7cf54827d6e43d88a9463bcc10d30472d0
Author: Ulrich Drepper <drepper@redhat.com>
Date:   Mon Jun 15 22:58:21 2009 -0700

is wrong if the PTY has the wrong ownership but the correct group.  That's
because this line:

if (st.st_gid != gid && chown (pty, getuid (), gid) < 0)

will not call chown() to fix the UID if the GID is already correct.  Since the
UID change is an important part of the function of pt_chown, it breaks things. 
I patched my local copy, removing the first clause from the &&, and it now works
for me again.

-- 
           Summary: pt_chown doesn't work when the PTY's gid is already
                    correct
           Product: glibc
           Version: 2.11
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: glibcbugs0000 at cneufeld dot ca
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=11697

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-06-11 19:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-11 19:11 [Bug libc/11697] New: pt_chown doesn't work when the PTY's gid is already correct glibcbugs0000 at cneufeld dot ca

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).