Bug 1701 - gnome-pty-helper's Unix98 pty support is broken.
gnome-pty-helper's Unix98 pty support is broken.
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: gnome-libs (Show other bugs)
6.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Michael Fulbright
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-03-23 15:10 EST by Bill Nottingham
Modified: 2014-03-16 22:09 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-03-24 11:57:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bill Nottingham 1999-03-23 15:10:17 EST
It creates /dev/pts entries owned by root,
not by the actual user. This causes problems
later on when you try to write to your
own terminal...
Comment 1 Bill Nottingham 1999-03-23 15:46:59 EST
The following patch should fix it:
--- gnome-libs-1.0.3/zvt/gnome-pty-helper.c.orig	Tue Mar 23 15:36:14
1999+++ gnome-libs-1.0.3/zvt/gnome-pty-helper.c	Tue Mar 23 15:41:11
1999
@@ -284,7 +284,11 @@
 		exit (1);
 	}

+        setegid(pwent->pw_gid);
+        seteuid(pwent->pw_uid);
 	status = openpty (&master_pty, &slave_pty, term_name, NULL, NULL);
+        setuid(getuid());
+        setgid(getgid());
 	if (status == -1){
 		result = 0;
 		write (STDIN_FILENO, &result, sizeof (result));
Comment 2 Michael Fulbright 1999-03-24 11:57:59 EST
I will be using the patch supplied when building gnome-core,
and I have submitted the patch to the GNOME developers.

Note You need to log in before you can comment on or make changes to this bug.