--- rxvt-unicode/src/ptytty.C 2005/02/17 15:07:48 1.23 +++ rxvt-unicode/src/ptytty.C 2005/12/31 16:06:48 1.24 @@ -76,9 +76,13 @@ int pfd; #ifdef PTYS_ARE_OPENPTY - char tty_name[sizeof "/dev/pts/????\0"]; + 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;