Loading...
--- Libc/Libc-391.4.2/util/pty.c
+++ Libc/Libc-262.3.2/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
@@ -66,7 +68,6 @@
#include <string.h>
#include <termios.h>
#include <unistd.h>
-#include <util.h>
int openpty(amaster, aslave, name, termp, winp)
int *amaster, *aslave;
@@ -94,7 +95,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;
@@ -117,7 +119,6 @@
return (-1);
}
-int
forkpty(amaster, name, termp, winp)
int *amaster;
char *name;