head	1.5;
access;
symbols
	RELEASE_7_3_0:1.3
	RELEASE_8_0_0:1.3
	RELEASE_7_2_0:1.3
	RELEASE_7_1_0:1.3
	RELEASE_6_4_0:1.3
	RELEASE_5_EOL:1.3
	RELEASE_7_0_0:1.3
	RELEASE_6_3_0:1.3
	PRE_XORG_7:1.3
	RELEASE_4_EOL:1.3
	RELEASE_6_2_0:1.3
	RELEASE_6_1_0:1.2
	RELEASE_5_5_0:1.2
	RELEASE_6_0_0:1.2
	RELEASE_5_4_0:1.2
	RELEASE_4_11_0:1.2
	RELEASE_5_3_0:1.2
	RELEASE_4_10_0:1.2
	RELEASE_5_2_1:1.2
	RELEASE_5_2_0:1.2
	RELEASE_4_9_0:1.2
	RELEASE_5_1_0:1.2
	RELEASE_4_8_0:1.2
	RELEASE_5_0_0:1.2
	RELEASE_4_7_0:1.2
	RELEASE_4_6_2:1.2
	RELEASE_4_6_1:1.2
	RELEASE_4_6_0:1.2
	RELEASE_5_0_DP1:1.2
	RELEASE_4_5_0:1.2
	RELEASE_4_4_0:1.1
	RELEASE_4_3_0:1.1
	RELEASE_4_2_0:1.1
	RELEASE_4_1_1:1.1
	RELEASE_4_1_0:1.1
	krb5_1_2:1.1
	krb5_1_1_1:1.1
	RELEASE_3_5_0:1.1
	RELEASE_4_0_0:1.1
	RELEASE_3_4_0:1.1
	RELEASE_3_3_0:1.1
	krb5_1_0_6:1.1
	krb5_1_0_5:1.1
	RELEASE_3_2_0:1.1;
locks; strict;
comment	@# @;


1.5
date	2010.04.26.03.48.43;	author cy;	state dead;
branches;
next	1.4;

1.4
date	2010.04.26.03.23.08;	author cy;	state Exp;
branches;
next	1.3;

1.3
date	2006.07.14.18.37.11;	author cy;	state Exp;
branches;
next	1.2;

1.2
date	2002.01.16.03.17.24;	author cy;	state Exp;
branches;
next	1.1;

1.1
date	99.04.05.23.36.46;	author nectar;	state Exp;
branches;
next	;


desc
@@


1.5
log
@Welcome the new krb5-1.8.1. Significant changes include the removal of
the MIT KRB5 applications (now in a separate tarball and port).
@
text
@--- appl/libpty/getpty.c.orig	Wed Jan  9 14:28:37 2002
+++ appl/libpty/getpty.c	Thu Jan 10 21:30:40 2002
@@@@ -24,14 +24,27 @@@@
 #include "libpty.h"
 #include "pty-int.h"
 #include "k5-platform.h"
 
+#ifdef __FreeBSD__
+#define PTYCHARS1	"pqrsPQRS"
+#define PTYCHARS2	"0123456789abcdefghijklmnopqrstuv"
+#endif
+
+#ifndef PTYCHARS1
+#define PTYCHARS1	"pqrstuvwxyzPQRST"
+#endif
+
+#ifndef PTYCHARS2
+#define PTYCHARS2	"0123456789abcdef"
+#endif
+
 long
 ptyint_getpty_ext(int *fd, char *slave, int slavelength, int do_grantpt)
 {
+    int ptynum;
+    char *cp1, *cp2;
 #if !defined(HAVE__GETPTY) && !defined(HAVE_OPENPTY)
-    char *cp;
     char *p;
-    int i,ptynum;
     struct stat stb;
     char slavebuf[1024];
 #endif
@@@@ -115,14 +128,14 @@@@
 	strncpy(slave, slavebuf, slavelength);
 	return 0;
     } else {
-    	for (cp = "pqrstuvwxyzPQRST";*cp; cp++) {
+    	for (cp1 = PTYCHARS1; *cp1 != '\0'; cp1++) {
 	    snprintf(slavebuf,sizeof(slavebuf),"/dev/ptyXX");
-	    slavebuf[sizeof("/dev/pty") - 1] = *cp;
+	    slavebuf[sizeof("/dev/pty") - 1] = *cp1;
 	    slavebuf[sizeof("/dev/ptyp") - 1] = '0';
 	    if (stat(slavebuf, &stb) < 0)
 		break;
-	    for (i = 0; i < 16; i++) {
-		slavebuf[sizeof("/dev/ptyp") - 1] = "0123456789abcdef"[i];
+	    for (cp2 = PTYCHARS2; *cp2 != '\0'; cp2++) {
+		slavebuf[sizeof("/dev/ptyp") - 1] = *cp2;
 		*fd = open(slavebuf, O_RDWR);
 		if (*fd < 0) continue;
 
@


1.4
log
@MFkrb5-17.
@
text
@@


1.3
log
@Update 1.4.3 --> 1.5
@
text
@d3 1
a3 1
@@@@ -24,13 +24,26 @@@@
d6 1
d39 1
a39 1
 	    sprintf(slavebuf,"/dev/ptyXX");
@


1.2
log
@Update 1.2.2 -> 1.2.3
@
text
@d1 2
a2 2
--- util/pty/getpty.c.orig	Wed Jan  9 14:28:37 2002
+++ util/pty/getpty.c	Thu Jan 10 21:30:40 2002
@


1.1
log
@Teach krlogind, telnetd, et. al. about FreeBSD's available ptys.
In other words,
  /dev/pty[p-zP-T][0-9a-f] -> /dev/pty[p-sP-S][0-9a-v]

Submitted by:	John Polstra <jdp@@polstra.com>
@
text
@d1 3
a3 3
--- util/pty/getpty.c.orig	Fri Feb  6 19:46:42 1998
+++ util/pty/getpty.c	Mon Apr  5 14:00:07 1999
@@@@ -21,13 +21,26 @@@@
d20 2
a21 3
 long pty_getpty (fd, slave, slavelength)
     int slavelength;
     int *fd; char *slave;
d23 3
a26 1
+    char *cp1, *cp2;
a28 1
+    int ptynum;
d31 2
a32 2
 #ifdef HAVE__GETPTY
@@@@ -109,14 +122,14 @@@@
@

