summaryrefslogtreecommitdiff
path: root/libexec/telnetd
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1999-08-17 09:13:17 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1999-08-17 09:13:17 +0000
commit63b7a98cc57e3a3fbf4e70bcd27a4eb65721c359 (patch)
tree04f5f18255e1ed724e1267f93be97b3001966d2b /libexec/telnetd
parentfe89691a2e6a46dc13e58dde591c3c37ac355e5c (diff)
More <sys/file.h> vs. <fcntl.h> and open() flags fixes.
Diffstat (limited to 'libexec/telnetd')
-rw-r--r--libexec/telnetd/sys_term.c12
-rw-r--r--libexec/telnetd/telnetd.c6
2 files changed, 9 insertions, 9 deletions
diff --git a/libexec/telnetd/sys_term.c b/libexec/telnetd/sys_term.c
index 5f28a8b4fda..98985c2562a 100644
--- a/libexec/telnetd/sys_term.c
+++ b/libexec/telnetd/sys_term.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sys_term.c,v 1.17 1998/07/28 20:18:20 marc Exp $ */
+/* $OpenBSD: sys_term.c,v 1.18 1999/08/17 09:13:13 millert Exp $ */
/* $NetBSD: sys_term.c,v 1.9 1996/03/20 04:25:53 tls Exp $ */
/*
@@ -39,7 +39,7 @@
static char sccsid[] = "@(#)sys_term.c 8.4+1 (Berkeley) 5/30/95";
static char rcsid[] = "$NetBSD: sys_term.c,v 1.8 1996/02/28 20:38:21 thorpej Exp $";
#else
-static char rcsid[] = "$OpenBSD: sys_term.c,v 1.17 1998/07/28 20:18:20 marc Exp $";
+static char rcsid[] = "$OpenBSD: sys_term.c,v 1.18 1999/08/17 09:13:13 millert Exp $";
#endif
#endif /* not lint */
@@ -493,7 +493,7 @@ int *ptynum;
int t;
char *ptsname();
- p = open("/dev/ptmx", 2);
+ p = open("/dev/ptmx", O_RDWR);
if (p > 0) {
grantpt(p);
unlockpt(p);
@@ -533,7 +533,7 @@ int *ptynum;
break;
for (i = 0; i < 16; i++) {
*p2 = "0123456789abcdef"[i];
- p = open(line, 2);
+ p = open(line, O_RDWR);
if (p > 0) {
#ifndef __hpux
line[5] = 't';
@@ -562,7 +562,7 @@ int *ptynum;
for (*ptynum = lowpty; *ptynum <= highpty; (*ptynum)++) {
(void) sprintf(myline, "/dev/pty/%03d", *ptynum);
- p = open(myline, 2);
+ p = open(myline, O_RDWR);
if (p < 0)
continue;
(void) sprintf(line, "/dev/ttyp%03d", *ptynum);
@@ -578,7 +578,7 @@ int *ptynum;
chown(line, 0, 0);
chmod(line, 0600);
(void)close(p);
- p = open(myline, 2);
+ p = open(myline, O_RDWR);
if (p < 0)
continue;
}
diff --git a/libexec/telnetd/telnetd.c b/libexec/telnetd/telnetd.c
index 1de5fab0de3..a97b8244c61 100644
--- a/libexec/telnetd/telnetd.c
+++ b/libexec/telnetd/telnetd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: telnetd.c,v 1.17 1999/07/20 22:40:42 deraadt Exp $ */
+/* $OpenBSD: telnetd.c,v 1.18 1999/08/17 09:13:13 millert Exp $ */
/* $NetBSD: telnetd.c,v 1.6 1996/03/20 04:25:57 tls Exp $ */
/*
@@ -45,7 +45,7 @@ static char copyright[] =
static char sccsid[] = "@(#)telnetd.c 8.4 (Berkeley) 5/30/95";
static char rcsid[] = "$NetBSD: telnetd.c,v 1.5 1996/02/28 20:38:23 thorpej Exp $";
#else
-static char rcsid[] = "$OpenBSD: telnetd.c,v 1.17 1999/07/20 22:40:42 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: telnetd.c,v 1.18 1999/08/17 09:13:13 millert Exp $";
#endif
#endif /* not lint */
@@ -820,7 +820,7 @@ doit(who)
if ((lp = getpty()) == NULL)
fatal(net, "Out of ptys");
- if ((pty = open(lp, 2)) >= 0) {
+ if ((pty = open(lp, O_RDWR)) >= 0) {
strncpy(line, lp, sizeof line -1);
line[sizeof line -1] = '\0';
line[5] = 't';