[1362] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

Kerb V5 Beta V on BSDI v2.0

daemon@ATHENA.MIT.EDU (Kurt J. Lidl)
Sun May 7 12:21:26 1995

From: "Kurt J. Lidl" <lidl@Pix.COM>
To: krb5-bugs@MIT.EDU
Date: Sun, 7 May 1995 12:21:11 -0400 (EDT)
In-Reply-To: <199505071559.LAA00137@meketrex.pix.com> from "Mail Delivery Subsystem" at May 7, 95 11:59:55 am

Here's the list of changes that I had to make just to get the Beta5
distribution to build under BSD/OS v2.0.

It's a more or less POSIX environment, with no backwards support for
any non-POSIX termios stuff.  It's derived from the BSD4.4-Lite
distribution.

I've ifdef'd the changes with __bsdi__ if I think they are bsdi
specific, and with other symbols if they seem generic.  Note - I've
not taken any measures to make this work under BSDi v1.1 -- only
v2.0.

One thing to point out is the telnet patches -- there is a setmode()
function on BSDI, which is POSIX mandated (I think.).  There is
a setmode() function in the telnet client as well.  I renamed the
setmode() in the telnet client to be tel_setmode().  You might want
to revisit this choice for a function name...

Finally, the file ./lib/krb5/ccache/file/fcc_close.c
includes "malloc.h".  This is destinctly non-portable.

I've not yet tried making the software work together yet -- these
patches are just first-round hacking to get it to compile.

Hope this helps out some in terms of getting things working.

-Kurt

===================================================================
RCS file: ./appl/bsd/RCS/krcp.c,v
retrieving revision 1.1
diff -u -r1.1 ./appl/bsd/krcp.c
--- 1.1	1995/05/06 23:53:04
+++ ./appl/bsd/krcp.c	1995/05/06 23:53:28
@@ -106,8 +106,10 @@
 char	*colon();
 int	errs;
 krb5_sigtype	lostconn();
+#ifndef __bsdi__
 int	errno;
 extern char	*sys_errlist[];
+#endif
 int	iamremote, targetshouldbedirectory;
 int	iamrecursive;
 int	pflag;
===================================================================
RCS file: ./appl/bsd/RCS/krlogin.c,v
retrieving revision 1.1
diff -u -r1.1 ./appl/bsd/krlogin.c
--- 1.1	1995/05/07 15:07:41
+++ ./appl/bsd/krlogin.c	1995/05/07 15:10:32
@@ -1485,12 +1485,18 @@
 			/* newtty.c_iflag |=  (BRKINT|ISTRIP|IXON|IXANY); */
 			newtty.c_iflag &= ~(IXON|IXANY);
 			newtty.c_iflag |=  (BRKINT|ISTRIP);
+#ifdef __bsdi__
+			newtty.c_oflag &= ~(ONLCR);
+#else
 			newtty.c_oflag &= ~(ONLCR|ONOCR);
+#endif
 			newtty.c_oflag |=  (OPOST);
 		}
+#ifndef __bsdi__
 		/* preserve tab delays, but turn off XTABS */
 		if ((newtty.c_oflag & TABDLY) == TAB3)
 			newtty.c_oflag &= ~TABDLY;
+#endif
 
 		if (litout)
 			newtty.c_oflag &= ~OPOST;
===================================================================
RCS file: ./appl/bsd/RCS/krshd.c,v
retrieving revision 1.1
diff -u -r1.1 ./appl/bsd/krshd.c
--- 1.1	1995/05/07 15:12:11
+++ ./appl/bsd/krshd.c	1995/05/07 15:14:23
@@ -434,6 +434,9 @@
 char	homedir[64] = "HOME=";
 char	shell[64] = "SHELL=";
 char    term[64] = "TERM=network";
+#ifdef __bsdi__
+#define RPATH "/krb5/bin:/usr/bin:/bin";
+#endif
 char	path_rest[] = RPATH;
 
 #ifdef CRAY
===================================================================
RCS file: ./appl/bsd/RCS/login.c,v
retrieving revision 1.1
diff -u -r1.1 ./appl/bsd/login.c
--- 1.1	1995/05/07 15:15:11
+++ ./appl/bsd/login.c	1995/05/07 15:17:01
@@ -871,6 +871,10 @@
 
 	envinit[i++] = NULL;
 
+#ifdef __bsdi__
+#define LPATH "/krb5/bin:/usr/bin:/bin"
+#endif
+
 	setenv("HOME", pwd->pw_dir, 0);
 	setenv("PATH", LPATH, 0);
 	setenv("USER", pwd->pw_name, 0);
@@ -1329,7 +1333,11 @@
  	tp->c_lflag |= ECHOKE;
 #endif
  	tp->c_iflag |= ICRNL|BRKINT;
+#ifdef __bsdi__
+ 	tp->c_oflag |= ONLCR|OPOST;
+#else
  	tp->c_oflag |= ONLCR|OPOST|TAB3;
+#endif
 #else /* !POSIX_TERMIOS */
 	tp->sg_flags = ECHO|CRMOD|ANYP|XTABS;
 #endif
===================================================================
RCS file: ./appl/telnet/telnet/RCS/commands.c,v
retrieving revision 1.1
diff -u -r1.1 ./appl/telnet/telnet/commands.c
--- 1.1	1995/05/07 15:18:17
+++ ./appl/telnet/telnet/commands.c	1995/05/07 15:21:20
@@ -1143,7 +1143,7 @@
 }
 
     int
-setmode(bit)
+tel_setmode(bit)
     int bit;
 {
     return dolmmode(bit, 1);
@@ -1177,17 +1177,17 @@
 #endif
     { "", "", 0 },
     { "",	"These require the LINEMODE option to be enabled", 0 },
-    { "isig",	"Enable signal trapping",	setmode, 1, MODE_TRAPSIG },
-    { "+isig",	0,				setmode, 1, MODE_TRAPSIG },
+    { "isig",	"Enable signal trapping",	tel_setmode, 1, MODE_TRAPSIG },
+    { "+isig",	0,				tel_setmode, 1, MODE_TRAPSIG },
     { "-isig",	"Disable signal trapping",	clearmode, 1, MODE_TRAPSIG },
-    { "edit",	"Enable character editing",	setmode, 1, MODE_EDIT },
-    { "+edit",	0,				setmode, 1, MODE_EDIT },
+    { "edit",	"Enable character editing",	tel_setmode, 1, MODE_EDIT },
+    { "+edit",	0,				tel_setmode, 1, MODE_EDIT },
     { "-edit",	"Disable character editing",	clearmode, 1, MODE_EDIT },
-    { "softtabs", "Enable tab expansion",	setmode, 1, MODE_SOFT_TAB },
-    { "+softtabs", 0,				setmode, 1, MODE_SOFT_TAB },
+    { "softtabs", "Enable tab expansion",	tel_setmode, 1, MODE_SOFT_TAB },
+    { "+softtabs", 0,				tel_setmode, 1, MODE_SOFT_TAB },
     { "-softtabs", "Disable character editing",	clearmode, 1, MODE_SOFT_TAB },
-    { "litecho", "Enable literal character echo", setmode, 1, MODE_LIT_ECHO },
-    { "+litecho", 0,				setmode, 1, MODE_LIT_ECHO },
+    { "litecho", "Enable literal character echo", tel_setmode, 1, MODE_LIT_ECHO },
+    { "+litecho", 0,				tel_setmode, 1, MODE_LIT_ECHO },
     { "-litecho", "Disable literal character echo", clearmode, 1, MODE_LIT_ECHO },
     { "help",	0,				modehelp, 0 },
 #ifdef	KLUDGELINEMODE
===================================================================
RCS file: ./lib/krb4/RCS/dest_tkt.c,v
retrieving revision 1.1
diff -u -r1.1 ./lib/krb4/dest_tkt.c
--- 1.1	1995/05/06 23:37:32
+++ ./lib/krb4/dest_tkt.c	1995/05/06 23:43:14
@@ -57,7 +57,11 @@
 	)
 	goto out;
 
+#if defined(O_FSYNC)
+    if ((fd = open(file, O_RDWR|O_FSYNC, 0)) < 0)
+#else
     if ((fd = open(file, O_RDWR|O_SYNC, 0)) < 0)
+#endif
 	goto out;
 
     memset(buf, 0, BUFSIZ);
===================================================================
RCS file: ./lib/krb4/RCS/in_tkt.c,v
retrieving revision 1.1
diff -u -r1.1 ./lib/krb4/in_tkt.c
--- 1.1	1995/05/06 23:43:18
+++ ./lib/krb4/in_tkt.c	1995/05/06 23:44:36
@@ -71,7 +71,11 @@
 	    return(KFAILURE);
 	}
 	/* file already exists, and permissions appear ok, so nuke it */
+#if defined(O_FSYNC)
+	if ((fd = open(file, O_RDWR|O_FSYNC, 0)) < 0)
+#else
 	if ((fd = open(file, O_RDWR|O_SYNC, 0)) < 0)
+#endif
 	    goto out; /* can't zero it, but we can still try truncating it */
 
 	memset(charbuf, 0, sizeof(charbuf));
===================================================================
RCS file: ./lib/krb5/ccache/file/RCS/fcc_close.c,v
retrieving revision 1.1
diff -u -r1.1 ./lib/krb5/ccache/file/fcc_close.c
--- 1.1	1995/05/06 23:22:04
+++ ./lib/krb5/ccache/file/fcc_close.c	1995/05/06 23:22:30
@@ -27,7 +27,9 @@
 
 
 #include "fcc.h"
+#if !defined(__bsdi__)
 #include <malloc.h>
+#endif
 /*
  * Modifies:
  * id

home help back first fref pref prev next nref lref last post