--- cygnus/src/slave/kprop.c	Tue Jul  1 14:14:30 1997
+++ kerbnet-1.2/slave/kprop.c	Tue May 27 22:03:40 1997
@@ -27,10 +27,10 @@
 #include <errno.h>
 #include <stdio.h>
 #include <ctype.h>
+#include <sys/types.h>
 #include <sys/file.h>
 #include <signal.h>
 #include <string.h>
-#include <sys/types.h>
 #include <sys/time.h>
 #include <sys/stat.h>
 #include <sys/socket.h>
@@ -92,7 +92,7 @@
 	exit(1);
 }
 
-void
+int
 main(argc, argv)
 	int	argc;
 	char	**argv;
@@ -324,13 +324,10 @@
 	memcpy((char *)&sin.sin_addr, hp->h_addr, hp->h_length);
 	if(!port) {
 		sp = getservbyname(KPROP_SERVICE, "tcp");
-		if (sp == 0) {
-			(void) strcpy(Errmsg, KPROP_SERVICE);
-			(void) strcat(Errmsg, "/tcp: unknown service");
-			*fd = -1;
-			return(0);
-		}
-		sin.sin_port = sp->s_port;
+                if (sp == 0)
+                  sin.sin_port = htons(DEFAULT_KPROP_PORT);
+                else
+                  sin.sin_port = sp->s_port;
 	} else
 		sin.sin_port = port;
 	s = socket(AF_INET, SOCK_STREAM, 0);
@@ -450,7 +447,7 @@
  		    data_fn);
  	    exit(1);
  	}
-	if ((fd = open(dbpathname, O_RDONLY)) < 0) {
+	if ((fd = THREEPARAMOPEN(dbpathname, O_RDONLY|O_BINARY, 0)) < 0) {
 		com_err(progname, errno, "while trying to open %s",
 			dbpathname);
 		exit(1);
