--- rxvt-unicode/src/ptytty.C 2006/01/02 15:10:18 1.26 +++ rxvt-unicode/src/ptytty.C 2006/01/04 03:02:01 1.28 @@ -78,7 +78,11 @@ #ifdef PTYS_ARE_OPENPTY char tty_name[sizeof "/dev/pts/????\0"]; - if (openpty (&pfd, fd_tty, tty_name, NULL, NULL) != -1) + rxvt_privileges(RESTORE); + int res = openpty (&pfd, fd_tty, tty_name, NULL, NULL); + rxvt_privileges(IGNORE); + + if (res != -1) { *ttydev = strdup (tty_name); return pfd; @@ -402,8 +406,7 @@ rxvt_ptytty::put () { #ifndef NO_SETOWNER_TTYDEV - if (tty >= 0) - privileges (RESTORE); + privileges (RESTORE); #endif if (pty >= 0) close (pty);