+Fri Mar 24 14:38:06 1995 <tytso@rsx-11.mit.edu>
+
+ * adm_network.c (setup_network): If /etc/services doesn't have the
+ administration port, use a compiled in port.
+
Thu Mar 2 12:24:50 1995 Theodore Y. Ts'o <tytso@dcl>
* Makefile.in (ISODELIB): Remove reference to $(ISODELIB).
service_servent = getservbyname(adm5_tcp_portname, "tcp");
- if (!service_servent) {
- krb5_free_principal(context, client_server_info.server);
+ if (service_servent) {
+ client_server_info.server_name.sin_port = service_servent->s_port;
+#ifdef DEBUG
+ fprintf(stderr, "Official service name = %s\n", service_servent->s_name);
+#endif /* DEBUG */
+ } else {
+#ifdef ADM5_DEFAULT_PORT
+ client_server_info.server_name.sin_port = htons(ADM5_DEFAULT_PORT);
+ com_err("setup_network", 0, "adm_network: using default port %d",
+ ADM5_DEFAULT_PORT);
+#else
+ krb5_free_principal(client_server_info.server);
free(client_server_info.name_of_service);
com_err("setup_network", 0, "adm_network: %s/tcp service unknown",
adm5_tcp_portname);
return(1);
+#endif
}
-#ifdef DEBUG
- fprintf(stderr, "Official service name = %s\n", service_servent->s_name);
-#endif /* DEBUG */
-
client_server_info.server_name.sin_port = service_servent->s_port;
if ((client_server_info.server_socket =