summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorGravatar Karl Ramm <kcr@mit.edu>2007-07-20 05:07:19 +0000
committerGravatar Karl Ramm <kcr@mit.edu>2007-07-20 05:07:19 +0000
commit15cf157d47aafe49fd59b7acc23fe172f8a23566 (patch)
tree747829bb544497cad68906bb21b2fd9fbb2cc1f3 /server
parent82ea504def6eb144c2b13b315890b297e29345c5 (diff)
debian patch applied and reconciled, version unfinalized
Diffstat (limited to 'server')
-rw-r--r--server/Makefile.in2
-rw-r--r--server/main.c4
-rw-r--r--server/realm.c8
-rw-r--r--server/server.c23
-rw-r--r--server/zserver.h6
-rw-r--r--server/zsrv_conf.h2
6 files changed, 17 insertions, 28 deletions
diff --git a/server/Makefile.in b/server/Makefile.in
index 3cba0fc..9c9cd3f 100644
--- a/server/Makefile.in
+++ b/server/Makefile.in
@@ -8,7 +8,7 @@ sbindir=@sbindir@
lsbindir=@lsbindir@
includedir=${prefix}/include
-mandir=${prefix}/man
+mandir=@mandir@
libdir=${exec_prefix}/lib
top_builddir=..
diff --git a/server/main.c b/server/main.c
index 37b8efb..e160929 100644
--- a/server/main.c
+++ b/server/main.c
@@ -91,9 +91,7 @@ unsigned short hm_srv_port; /* host manager server sending port */
char *programname; /* set to the basename of argv[0] */
char myname[MAXHOSTNAMELEN]; /* my host name */
-#ifndef HAVE_HESIOD
char list_file[128];
-#endif
#ifdef HAVE_KRB4
char srvtab_file[128];
char my_realm[REALM_SZ];
@@ -139,9 +137,7 @@ main(argc, argv)
extern char *optarg;
extern int optind;
-#ifndef HAVE_HESIOD
sprintf(list_file, "%s/zephyr/%s", SYSCONFDIR, SERVER_LIST_FILE);
-#endif
#ifdef HAVE_KRB4
sprintf(srvtab_file, "%s/zephyr/%s", SYSCONFDIR, ZEPHYR_SRVTAB);
sprintf(tkt_file, "%s/zephyr/%s", SYSCONFDIR, ZEPHYR_TKFILE);
diff --git a/server/realm.c b/server/realm.c
index 37b0df9..ecef9eb 100644
--- a/server/realm.c
+++ b/server/realm.c
@@ -619,12 +619,14 @@ realm_deathgram(server)
zdbug((LOG_DEBUG, "rlm_deathgram: suggesting %s to %s",
(server) ? server->addr_str : "nothing", realm->name));
+#ifdef HAVE_KRB4
if (!ticket_lookup(realm->name))
if ((retval = ticket_retrieve(realm)) != ZERR_NONE) {
syslog(LOG_WARNING, "rlm_deathgram failed: %s",
error_message(retval));
return;
}
+#endif
if ((retval = ZFormatNotice(&snotice, &pack, &packlen, ZAUTH))
!= ZERR_NONE)
@@ -683,12 +685,14 @@ realm_wakeup()
snotice.z_message = NULL;
snotice.z_message_len = 0;
+#ifdef HAVE_KRB4
if (!ticket_lookup(realm->name))
if ((retval = ticket_retrieve(realm)) != ZERR_NONE) {
syslog(LOG_WARNING, "rlm_wakeup failed: %s",
error_message(retval));
continue;
}
+#endif
if ((retval = ZFormatNotice(&snotice, &pack, &packlen, ZAUTH))
!= ZERR_NONE)
@@ -1227,8 +1231,8 @@ realm_sendit_auth(notice, who, auth, realm, ack_to_sender)
(void) sprintf(multi, "%d/%d", offset+origoffset, origlen);
partnotice.z_multinotice = multi;
if (offset > 0) {
- (void) gettimeofday(&partnotice.z_uid.tv,
- (struct timezone *)0);
+ (void) Z_gettimeofday(&partnotice.z_uid.tv,
+ (struct timezone *)0);
partnotice.z_uid.tv.tv_sec = htonl((u_long)
partnotice.z_uid.tv.tv_sec);
partnotice.z_uid.tv.tv_usec =
diff --git a/server/server.c b/server/server.c
index 377d397..5cce0ff 100644
--- a/server/server.c
+++ b/server/server.c
@@ -92,10 +92,8 @@ static Code_t server_register();
#endif
static struct in_addr *get_server_addrs __P((int *number));
-#ifndef HAVE_HESIOD
static char **get_server_list __P((char *file));
static void free_server_list __P((char **list));
-#endif
static Unacked *srv_nacktab[SRV_NACKTAB_HASHSIZE];
Server *otherservers; /* points to an array of the known
@@ -981,22 +979,21 @@ get_server_addrs(number)
int *number; /* RETURN */
{
int i;
- char **server_hosts;
+ char **server_hosts = NULL;
+ char **server_hosts_free = NULL;
char **cpp;
struct in_addr *addrs;
struct in_addr *addr;
struct hostent *hp;
+ server_hosts = get_server_list(list_file);
+ server_hosts_free = server_hosts;
#ifdef HAVE_HESIOD
- /* get the names from Hesiod */
- server_hosts = hes_resolve("zephyr","sloc");
if (!server_hosts)
- return NULL;
-#else
- server_hosts = get_server_list(list_file);
+ server_hosts = hes_resolve("zephyr","sloc");
+#endif
if (!server_hosts)
return NULL;
-#endif
/* count up */
i = 0;
for (cpp = server_hosts; *cpp; cpp++)
@@ -1015,14 +1012,11 @@ get_server_addrs(number)
}
}
*number = i;
-#ifndef HAVE_HESIOD
- free_server_list(server_hosts);
-#endif
+ if (server_hosts_free)
+ free_server_list(server_hosts_free);
return addrs;
}
-#ifndef HAVE_HESIOD
-
static int nhosts = 0;
/*
@@ -1090,7 +1084,6 @@ free_server_list(list)
free(orig_list);
return;
}
-#endif
/*
* initialize the server structure for address addr, and set a timer
diff --git a/server/zserver.h b/server/zserver.h
index dc84cf5..221e26b 100644
--- a/server/zserver.h
+++ b/server/zserver.h
@@ -269,8 +269,8 @@ void sweep_ticket_hash_table __P((void *));
Sched *check_key_sched_cache __P((des_cblock key));
void add_to_key_sched_cache __P((des_cblock key, Sched *sched));
int krb_set_key __P((char *key, int cvt));
-int krb_rd_req __P((KTEXT authent, char *service, char *instance,
- unsigned KRB_INT32 from_addr, AUTH_DAT *ad, char *fn));
+/* int krb_rd_req __P((KTEXT authent, char *service, char *instance,
+ unsigned KRB_INT32 from_addr, AUTH_DAT *ad, char *fn)); */
int krb_find_ticket __P((KTEXT authent, KTEXT ticket));
int krb_get_lrealm __P((char *r, int n));
#endif
@@ -354,9 +354,7 @@ extern fd_set interesting; /* the file descrips we are listening
extern int nfds; /* number to look at in select() */
extern int zdebug;
extern char myname[]; /* domain name of this host */
-#ifndef HAVE_HESIOD
extern char list_file[];
-#endif
#ifdef HAVE_KRB4
extern char srvtab_file[];
extern char my_realm[];
diff --git a/server/zsrv_conf.h b/server/zsrv_conf.h
index d2f32ed..7b663da 100644
--- a/server/zsrv_conf.h
+++ b/server/zsrv_conf.h
@@ -16,9 +16,7 @@
/* Path names are relative to CONFDIR, except for the class registry. */
-#ifndef HAVE_HESIOD
#define SERVER_LIST_FILE "server.list"
-#endif
#define REALM_LIST_FILE "realm.list"
#ifdef HAVE_KRB4
#define ZEPHYR_SRVTAB "srvtab"