--- rxvt-unicode/src/ptytty.C 2006/01/02 15:10:18 1.26 +++ rxvt-unicode/src/ptytty.C 2006/01/03 16:32:33 1.27 @@ -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;