Bug 5314 - /usr/libexec/pt_chown should be suid root
Summary: /usr/libexec/pt_chown should be suid root
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 6.1
Hardware: i386
OS: Linux
high
high
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-09-22 21:38 UTC by Hans de Goede
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 1999-10-01 22:34:18 UTC
Embargoed:


Attachments (Terms of Use)

Description Hans de Goede 1999-09-22 21:38:06 UTC
/usr/libexec/pt_chown should be suid root and it isn't,
this causes mc's subshell and gnome-terminal to fail when
run by non root.

Probably also causes other problems.

This is with the latest glibc from the snapshots dir:
glibc-2.1.2-11

Comment 1 Bill Nottingham 1999-10-01 16:46:59 UTC
Can't reproduce this here; glibc-2.1.2-11, latest gnome-core
& mc.

Comment 2 Hans de Goede 1999-10-01 16:56:59 UTC
Hmm, could you do a "ls -l /usr/libexec/pt_chown" and check if it is
suid root? It should be, but in the rpm it isn't.
Did you test this as an ordinary user? As root it works fine.

If it is suid root, could you also do "rpm --verify glibc" ?
I made it suid root myself and rpm --verify glibc complains that the
mode is not ok.

"rpm -ql --dump glibc|grep pt_chown" gives:
/usr/libexec/pt_chown 34643 937818817 3f730db73c6f4ff5d4f20b37a7fe7976
0100755 root root 0 0 19171 X

Which should be:
/usr/libexec/pt_chown 34643 937818817 3f730db73c6f4ff5d4f20b37a7fe7976
0104755 root root 0 0 19171 X

rpm -q glibc gives:
glibc-2.1.2-11

Comment 3 Hans de Goede 1999-10-01 17:02:59 UTC
Just read you mail that it isn't suid root for you, you could have
mentioned that over here too ;)

Okay, you're partially right mc seems to have been fixed to not use
pt_chown anymore.

But gnome-terminal still gives:
[hans@shalem hans]$ gnome-terminal
pt_chown: needs to be installed setuid `root'
Error: unable to fork: Success
[hans@shalem hans]$

Comment 4 Hans de Goede 1999-10-01 17:13:59 UTC
correction it is a tricky bug:

Change /usr/libexec/pt_chown to 755

If I open one gnome-terminal all is well
second all is well, third fails

What happens is that pt_chown is only called for pty's which haven't
been used by the owner before so If I first open a few gnome-terminals
with /usr/libexec/pt_chown suid root.

And then try it without /usr/libexec/pt_chown suid root then I can
open as many terminals as I already had open, it goes wrong as soon as
I open as many as I had open + 1.

If I'm as far that gnome-terminal starts failing so does mc's
subshell.

Comment 5 Bill Nottingham 1999-10-01 18:49:59 UTC
Do you have the /dev/pts filesystem mounted?

Comment 6 Hans de Goede 1999-10-01 18:59:59 UTC
oops, I didn't, with it it works fine sorry for the hassle.

Comment 7 Bill Nottingham 1999-10-01 22:34:59 UTC
That's OK.

Comment 8 Hans de Goede 1999-12-21 15:19:59 UTC
After some further checking I found out that the problem is devfs related, this
bug does happen on devfs kernel, since devfs doesn't support the pts filesystem,
so maybe this should still be fixed, maybe ?


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