Loading...
util/pty.c Libc-391 Libc-320
--- Libc/Libc-391/util/pty.c
+++ Libc/Libc-320/util/pty.c
@@ -2,6 +2,8 @@
  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
+ * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
  * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
@@ -94,7 +96,8 @@
 					return (-1);	/* out of ptys */
 			} else {
 				line[5] = 't';
-				(void) grantpt(master);
+				(void) chown(line, getuid(), ttygid);
+				(void) chmod(line, S_IRUSR|S_IWUSR|S_IWGRP);
 				(void) revoke(line);
 				if ((slave = open(line, O_RDWR, 0)) != -1) {
 					*amaster = master;