Imported Upstream version 1.7.4p4
[debian/sudo] / get_pty.c
index 7bc035518f4786efc613cf41df5390fa2618727f..7b35108234256b35972978c42a86cc4fdbb59aca 100644 (file)
--- a/get_pty.c
+++ b/get_pty.c
@@ -88,7 +88,7 @@ get_pty(master, slave, name, namesz, ttyuid)
     char *line;
 
     /* IRIX-style dynamic ptys (may fork) */
-    line = _getpty(master, O_RDWR, IRUSR|S_IWUSR|S_IWGRP, 0);
+    line = _getpty(master, O_RDWR, S_IRUSR|S_IWUSR|S_IWGRP, 0);
     if (line == NULL)
        return (0);
     *slave = open(line, O_RDWR|O_NOCTTY, 0);
@@ -146,7 +146,7 @@ get_pty(master, slave, name, namesz, ttyuid)
        close(*master);
        return(0);
     }
-# ifdef I_PUSH
+# if defined(I_PUSH) && !defined(_AIX)
     ioctl(*slave, I_PUSH, "ptem");     /* pseudo tty emulation module */
     ioctl(*slave, I_PUSH, "ldterm");   /* line discipline module */
 # endif