Bug#42986: [Konsole-devel] Bug#42986: dup2() in freebsd

Michael Samuel michael at miknet.net
Tue Sep 3 07:31:22 UTC 2002


[I'm subscribed to the list now, so I this should be the last message
cut 'n pasted from the archive]

> Good idea. My compiler explains to me that I have revoke() but that it
> isn't implemented :-]

This should probably be an #ifdef of some sort, then. (I know FreeBSD
and OpenBSD both have revoke, and FreeBSD's openpty() definately uses
revoke as I explained).

After checking the glibc source, I don't think Linux with /dev/pts is
vulnerable, but glibc's openpty without devpts seems just as vulnerable
as konsole.

Also, after putting in the printf() on the dup2() call, I noticed that
sometimes when closing the pty, the pty master file descriptor is
invalidated before chownpty is called, causing the pty ownership not to
be restored.  This is reproducible when closing konsole via the close
button, or doing a ctrl-d on the last open terminal. (Typing exit from
the shell doesn't trigger it)

-- 
Michael Samuel <michael at miknet.net>



More information about the konsole-devel mailing list