Index: lib/libutil/pty.c =================================================================== RCS file: /home/ncvs/src/lib/libutil/pty.c,v retrieving revision 1.15 diff -u -I__FBSDID -I$FreeBSD -r1.15 pty.c --- lib/libutil/pty.c 18 Oct 2003 10:04:16 -0000 1.15 +++ lib/libutil/pty.c 10 Jan 2008 20:51:06 -0000 @@ -76,8 +76,7 @@ break; /* try the next pty group */ } else { line[5] = 't'; - (void) chown(line, getuid(), ttygid); - (void) chmod(line, S_IRUSR|S_IWUSR|S_IWGRP); + (void) grantpt(master); (void) revoke(line); if ((slave = open(line, O_RDWR, 0)) != -1) { *amaster = master;