summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--clients/zmailnotify/zmailnotify.c8
-rw-r--r--clients/zshutdown_notify/zshutdown_notify.c8
-rw-r--r--h/internal.h4
-rw-r--r--h/sysdep.h2
-rw-r--r--lib/ZCkAuth.c2
-rw-r--r--lib/ZFmtAuth.c2
-rw-r--r--lib/ZGetSender.c4
-rw-r--r--lib/ZInit.c6
-rw-r--r--lib/ZMkAuth.c6
-rw-r--r--lib/Zinternal.c2
-rw-r--r--server/acl_files.c2
-rw-r--r--server/bdump.c58
-rw-r--r--server/dispatch.c8
-rw-r--r--server/kopt.c4
-rw-r--r--server/main.c20
-rw-r--r--server/realm.c14
-rw-r--r--server/server.c10
-rw-r--r--server/subscr.c10
-rw-r--r--server/zsrv_conf.h4
-rw-r--r--zhm/zhm.c6
20 files changed, 89 insertions, 91 deletions
diff --git a/clients/zmailnotify/zmailnotify.c b/clients/zmailnotify/zmailnotify.c
index f6575e7..5b1ed06 100644
--- a/clients/zmailnotify/zmailnotify.c
+++ b/clients/zmailnotify/zmailnotify.c
@@ -22,11 +22,11 @@ static const char rcsid_zmailnotify_c[] =
#include <sys/socket.h>
#include <pwd.h>
#include <netdb.h>
-#ifdef ZEPHYR_USES_HESIOD
+#ifdef HAVE_HESIOD
#include <hesiod.h>
#endif
-#ifndef ZEPHYR_USES_KERBEROS
+#ifndef HAVE_KRB4
#undef KPOP
#endif
@@ -72,7 +72,7 @@ main(argc, argv)
int i,nbytes,retval,uselock;
struct passwd *pwd;
struct _mail mymail;
-#ifdef ZEPHYR_USES_HESIOD
+#ifdef HAVE_HESIOD
struct hes_postoffice *p;
#endif
@@ -104,7 +104,7 @@ main(argc, argv)
(void) sprintf(lockfile,"%s/.maillock",dir);
host = (char *)getenv("MAILHOST");
-#ifdef ZEPHYR_USES_HESIOD
+#ifdef HAVE_HESIOD
if (host == NULL) {
p = hes_getmailhost(user);
if (p != NULL && strcmp(p->po_type, "POP") == 0)
diff --git a/clients/zshutdown_notify/zshutdown_notify.c b/clients/zshutdown_notify/zshutdown_notify.c
index e7727e6..4db5a32 100644
--- a/clients/zshutdown_notify/zshutdown_notify.c
+++ b/clients/zshutdown_notify/zshutdown_notify.c
@@ -29,7 +29,7 @@ static const char *rcsid_zshutdown_notify_c =
#define N_DEF_FORMAT "From $sender:\n@bold(Shutdown message from $1 at $time)\n@center(System going down, message is:)\n\n$2\n\n@center(@bold($3))"
#define N_FIELD_CNT 3
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
#define SVC_NAME "rcmd"
#endif
@@ -52,7 +52,7 @@ main(argc,argv)
char msgbuff[BUFSIZ], message[Z_MAXPKTLEN], *ptr;
char scratch[BUFSIZ];
char *msg[N_FIELD_CNT];
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
char tkt_filename[MAXPATHLEN];
char rlm[REALM_SZ];
char hn2[MAXHOSTNAMELEN];
@@ -73,7 +73,7 @@ main(argc,argv)
sprintf(scratch, warning, hostname);
msg[2] = scratch;
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
(void) sprintf(tkt_filename, "/tmp/tkt_zshut_%d", getpid());
krb_set_tkt_string(tkt_filename);
@@ -128,7 +128,7 @@ main(argc,argv)
notice.z_default_format = N_DEF_FORMAT;
retval = ZSendList(&notice, msg, N_FIELD_CNT, ZAUTH);
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
(void) dest_tkt();
#endif
diff --git a/h/internal.h b/h/internal.h
index ee97cef..c1c0a63 100644
--- a/h/internal.h
+++ b/h/internal.h
@@ -7,17 +7,15 @@
#include <netdb.h>
#ifdef HAVE_KRB4
-#define ZEPHYR_USES_KERBEROS
#include <krb.h>
#include <krb_err.h>
#endif
#ifdef HAVE_HESIOD
-#define ZEPHYR_USES_HESIOD
#include <hesiod.h>
#endif
-#ifndef ZEPHYR_USES_KERBEROS
+#ifndef HAVE_KRB4
#define REALM_SZ MAXHOSTNAMELEN
#define INST_SZ 0 /* no instances w/o Kerberos */
#define ANAME_SZ 9 /* size of a username + null */
diff --git a/h/sysdep.h b/h/sysdep.h
index d39e85e..641d8d9 100644
--- a/h/sysdep.h
+++ b/h/sysdep.h
@@ -161,7 +161,7 @@ ZEPHYR_INT32 gethostid();
#endif
/* Kerberos compatibility. */
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
# include <krb.h>
# include <krb_err.h>
# include <des.h>
diff --git a/lib/ZCkAuth.c b/lib/ZCkAuth.c
index 8f4816e..3e81560 100644
--- a/lib/ZCkAuth.c
+++ b/lib/ZCkAuth.c
@@ -31,7 +31,7 @@ Code_t ZCheckAuthentication(notice, from)
ZNotice_t *notice;
struct sockaddr_in *from;
{
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
int result;
ZChecksum_t our_checksum;
CREDENTIALS cred;
diff --git a/lib/ZFmtAuth.c b/lib/ZFmtAuth.c
index 5ac708a..1a35f8c 100644
--- a/lib/ZFmtAuth.c
+++ b/lib/ZFmtAuth.c
@@ -18,7 +18,7 @@ static char rcsid_ZFormatAuthenticNotice_c[] = "$Header$";
#include <internal.h>
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
Code_t ZFormatAuthenticNotice(notice, buffer, buffer_len, len, session)
ZNotice_t *notice;
register char *buffer;
diff --git a/lib/ZGetSender.c b/lib/ZGetSender.c
index 4b8d0ba..7b75c89 100644
--- a/lib/ZGetSender.c
+++ b/lib/ZGetSender.c
@@ -24,7 +24,7 @@ static const char rcsid_ZGetSender_c[] =
char *ZGetSender()
{
struct passwd *pw;
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
char pname[ANAME_SZ], pinst[INST_SZ], prealm[REALM_SZ];
static char sender[ANAME_SZ+INST_SZ+REALM_SZ+3] = "";
#else
@@ -35,7 +35,7 @@ char *ZGetSender()
if (*sender)
return (sender);
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
if (krb_get_tf_fullname((char *)TKT_FILE, pname, pinst, prealm) == KSUCCESS)
{
(void) sprintf(sender, "%s%s%s@%s", pname, (pinst[0]?".":""),
diff --git a/lib/ZInit.c b/lib/ZInit.c
index 997ffc0..8e875ba 100644
--- a/lib/ZInit.c
+++ b/lib/ZInit.c
@@ -20,7 +20,7 @@ static char rcsid_ZInitialize_c[] =
#include <internal.h>
#include <sys/socket.h>
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
#include <krb_err.h>
#endif
@@ -28,7 +28,7 @@ Code_t ZInitialize()
{
struct servent *hmserv;
char addr[4];
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
Code_t code;
ZNotice_t notice;
char *krealm;
@@ -61,7 +61,7 @@ Code_t ZInitialize()
__Q_Tail = NULL;
__Q_Head = NULL;
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
/* if the application is a server, there might not be a zhm. The
code will fall back to something which might not be "right",
diff --git a/lib/ZMkAuth.c b/lib/ZMkAuth.c
index 18d5014..8d0fc1f 100644
--- a/lib/ZMkAuth.c
+++ b/lib/ZMkAuth.c
@@ -18,14 +18,14 @@
static const char rcsid_ZMakeAuthentication_c[] = "$Id$";
#endif
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
#include <krb_err.h>
static long last_authent_time = 0L;
static KTEXT_ST last_authent;
#endif
Code_t ZResetAuthentication () {
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
last_authent_time = 0L;
#endif
return ZERR_NONE;
@@ -37,7 +37,7 @@ Code_t ZMakeAuthentication(notice, buffer, buffer_len, len)
int buffer_len;
int *len;
{
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
int result;
time_t now;
KTEXT_ST authent;
diff --git a/lib/Zinternal.c b/lib/Zinternal.c
index a9f8fa8..f294fd1 100644
--- a/lib/Zinternal.c
+++ b/lib/Zinternal.c
@@ -46,7 +46,7 @@ ZSubscription_t *__subscriptions_list;
int __subscriptions_num;
int __subscriptions_next;
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
C_Block __Zephyr_session;
#endif
char __Zephyr_realm[REALM_SZ];
diff --git a/server/acl_files.c b/server/acl_files.c
index 27c7f63..83b6663 100644
--- a/server/acl_files.c
+++ b/server/acl_files.c
@@ -114,7 +114,7 @@ void acl_canonicalize_principal(principal, canon)
canon += len;
*canon++ = '\0';
}
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
else if (krb_get_lrealm(canon, 1) != KSUCCESS) {
strcpy(canon, KRB_REALM);
}
diff --git a/server/bdump.c b/server/bdump.c
index 17f99db..5697ab5 100644
--- a/server/bdump.c
+++ b/server/bdump.c
@@ -66,7 +66,7 @@ static int setup_file_pointers __P((void));
static void shutdown_file_pointers __P((void));
static void cleanup __P((Server *server));
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
static long ticket_time;
static char my_realm[REALM_SZ];
@@ -77,7 +77,7 @@ static char my_realm[REALM_SZ];
extern C_Block serv_key;
extern Sched serv_ksched;
#endif
-#endif /* ZEPHYR_USES_KERBEROS */
+#endif /* HAVE_KRB4 */
static Timer *bdump_timer;
static int live_socket = -1;
@@ -105,15 +105,15 @@ bdump_offer(who)
{
Code_t retval;
char buf[512], *addr, *lyst[2];
-#ifndef ZEPHYR_USES_KERBEROS
+#ifndef HAVE_KRB4
int bdump_port = IPPORT_RESERVED - 1;
-#endif /* !ZEPHYR_USES_KERBEROS */
+#endif /* !HAVE_KRB4 */
#if 1
zdbug((LOG_DEBUG, "bdump_offer"));
#endif
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
/*
- * when using ZEPHYR_USES_KERBEROS server-server authentication, we can
+ * when using HAVE_KRB4 server-server authentication, we can
* use any random local address
*/
bdump_socket = socket(AF_INET, SOCK_STREAM, 0);
@@ -148,9 +148,9 @@ bdump_offer(who)
return;
}
}
-#else /* !ZEPHYR_USES_KERBEROS */
+#else /* !HAVE_KRB4 */
/*
- * when not using ZEPHYR_USES_KERBEROS, we can't use any old port, we use
+ * when not using HAVE_KRB4, we can't use any old port, we use
* Internet reserved ports instead (rresvport)
*/
bdump_socket = rresvport(&bdump_port);
@@ -163,7 +163,7 @@ bdump_offer(who)
bdump_sin.sin_port = htons((unsigned short) bdump_port);
bdump_sin.sin_addr = my_addr;
bdump_sin.sin_family = AF_INET;
-#endif /* ZEPHYR_USES_KERBEROS */
+#endif /* HAVE_KRB4 */
listen(bdump_socket, 1);
@@ -213,12 +213,12 @@ bdump_send()
struct sigaction action;
#endif
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
KTEXT_ST ticket;
AUTH_DAT kdata;
#else
unsigned short fromport;
-#endif /* ZEPHYR_USES_KERBEROS */
+#endif /* HAVE_KRB4 */
#if 1
zdbug((LOG_DEBUG, "bdump_send"));
@@ -233,7 +233,7 @@ bdump_send()
sizeof(on)) < 0)
syslog(LOG_WARNING, "bdump_send: setsockopt (SO_KEEPALIVE): %m");
-#ifndef ZEPHYR_USES_KERBEROS
+#ifndef HAVE_KRB4
fromport = ntohs(from.sin_port);
#endif
@@ -274,7 +274,7 @@ bdump_send()
/* Now begin the brain dump. */
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
/* receive the authenticator */
retval = GetKerberosData(live_socket, from.sin_addr, &kdata,
SERVER_SERVICE, srvtab_file);
@@ -305,13 +305,13 @@ bdump_send()
cleanup(server);
return;
}
-#else /* !ZEPHYR_USES_KERBEROS */
+#else /* !HAVE_KRB4 */
if (fromport > IPPORT_RESERVED || fromport < IPPORT_RESERVED / 2) {
syslog(LOG_ERR, "bdump_send: bad port from peer: %d", fromport);
cleanup(server);
return;
}
-#endif /* ZEPHYR_USES_KERBEROS */
+#endif /* HAVE_KRB4 */
retval = setup_file_pointers();
if (retval != 0) {
@@ -375,12 +375,12 @@ bdump_get_v12 (notice, auth, who, server)
#ifdef _POSIX_VERSION
struct sigaction action;
#endif
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
KTEXT_ST ticket;
AUTH_DAT kdata;
-#else /* !ZEPHYR_USES_KERBEROS */
+#else /* !HAVE_KRB4 */
int reserved_port = IPPORT_RESERVED - 1;
-#endif /* ZEPHYR_USES_KERBEROS */
+#endif /* HAVE_KRB4 */
bdumping = 1;
server->dumping = 1;
@@ -420,7 +420,7 @@ bdump_get_v12 (notice, auth, who, server)
server->dumping = 0;
return;
}
-#ifndef ZEPHYR_USES_KERBEROS
+#ifndef HAVE_KRB4
if (ntohs(from.sin_port) > IPPORT_RESERVED ||
ntohs(from.sin_port) < IPPORT_RESERVED / 2) {
syslog(LOG_ERR, "bdump_get: port not reserved: %d",
@@ -429,9 +429,9 @@ bdump_get_v12 (notice, auth, who, server)
return;
}
live_socket = rresvport(&reserved_port);
-#else /* !ZEPHYR_USES_KERBEROS */
+#else /* !HAVE_KRB4 */
live_socket = socket(AF_INET, SOCK_STREAM, 0);
-#endif /* ZEPHYR_USES_KERBEROS */
+#endif /* HAVE_KRB4 */
if (live_socket < 0) {
syslog(LOG_ERR, "bdump_get: socket: %m");
cleanup(server);
@@ -451,7 +451,7 @@ bdump_get_v12 (notice, auth, who, server)
/* Now begin the brain dump. */
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
/* send an authenticator */
if (get_tgt()) {
cleanup(server);
@@ -485,7 +485,7 @@ bdump_get_v12 (notice, auth, who, server)
cleanup(server);
return;
}
-#endif /* ZEPHYR_USES_KERBEROS */
+#endif /* HAVE_KRB4 */
retval = setup_file_pointers();
if (retval != 0) {
syslog(LOG_WARNING, "bdump_get: can't set up file pointers: %s",
@@ -681,7 +681,7 @@ cleanup(server)
server->dumping = 0;
}
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
int
get_tgt()
{
@@ -743,7 +743,7 @@ get_tgt()
}
return(0);
}
-#endif /* ZEPHYR_USES_KERBEROS */
+#endif /* HAVE_KRB4 */
/*
* The braindump offer wasn't taken, so we retract it.
@@ -784,10 +784,10 @@ bdump_recv_loop(server)
Code_t retval;
Client *client = NULL;
struct sockaddr_in who;
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
char *cp;
C_Block cblock;
-#endif /* ZEPHYR_USES_KERBEROS */
+#endif /* HAVE_KRB4 */
Realm *realm = NULL;
#if 1
@@ -867,7 +867,7 @@ bdump_recv_loop(server)
syslog(LOG_ERR,"brl failed: %s", error_message(retval));
return retval;
}
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
memset(client->session_key, 0, sizeof(C_Block));
if (*notice.z_class_inst) {
/* a C_Block is there */
@@ -885,7 +885,7 @@ bdump_recv_loop(server)
#endif
}
}
-#endif /* ZEPHYR_USES_KERBEROS */
+#endif /* HAVE_KRB4 */
} else if (strcmp(notice.z_opcode, CLIENT_SUBSCRIBE) == 0) {
/* a subscription packet */
if (!client) {
diff --git a/server/dispatch.c b/server/dispatch.c
index 084a1bc..5523e1b 100644
--- a/server/dispatch.c
+++ b/server/dispatch.c
@@ -599,7 +599,7 @@ xmit(notice, dest, auth, client)
we are distributing authentic and
we have a pointer to auth info
*/
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
retval = ZFormatAuthenticNotice(notice, noticepack, packlen, &packlen,
client->session_key);
if (retval != ZERR_NONE) {
@@ -607,7 +607,7 @@ xmit(notice, dest, auth, client)
free(noticepack);
return;
}
-#else /* !ZEPHYR_USES_KERBEROS */
+#else /* !HAVE_KRB4 */
notice->z_auth = 1;
retval = ZFormatSmallRawNotice(notice, noticepack, &packlen);
if (retval != ZERR_NONE) {
@@ -615,7 +615,7 @@ xmit(notice, dest, auth, client)
free(noticepack);
return;
}
-#endif /* ZEPHYR_USES_KERBEROS */
+#endif /* HAVE_KRB4 */
} else {
notice->z_auth = 0;
notice->z_authent_len = 0;
@@ -1023,7 +1023,7 @@ control_dispatch(notice, auth, who, server)
clt_ack(notice, who, AUTH_FAILED);
return ZERR_NONE;
}
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
/* in case it's changed */
memcpy(client->session_key, ZGetSession(), sizeof(C_Block));
#endif
diff --git a/server/kopt.c b/server/kopt.c
index 30cddff..3017217 100644
--- a/server/kopt.c
+++ b/server/kopt.c
@@ -26,7 +26,7 @@ static const char *rcsid_rd_req_c =
#endif /* lint */
#endif /* SABER */
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
#ifndef NOENCRYPTION
/* Byte ordering */
@@ -610,5 +610,5 @@ decomp_ticket(tkt, flags, pname, pinstance, prealm, paddress, session,
return(KSUCCESS);
}
-#endif /* ZEPHYR_USES_KERBEROS */
+#endif /* HAVE_KRB4 */
diff --git a/server/main.c b/server/main.c
index af0d91c..413bbe3 100644
--- a/server/main.c
+++ b/server/main.c
@@ -91,10 +91,10 @@ 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 ZEPHYR_USES_HESIOD
+#ifndef HAVE_HESIOD
char list_file[128];
#endif
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
char srvtab_file[128];
char my_realm[REALM_SZ];
static char tkt_file[128];
@@ -139,10 +139,10 @@ main(argc, argv)
extern char *optarg;
extern int optind;
-#ifndef ZEPHYR_USES_HESIOD
+#ifndef HAVE_HESIOD
sprintf(list_file, "%s/%s", SYSCONFDIR, SERVER_LIST_FILE);
#endif
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
sprintf(srvtab_file, "%s/%s", SYSCONFDIR, ZEPHYR_SRVTAB);
sprintf(tkt_file, "%s/%s", SYSCONFDIR, ZEPHYR_TKFILE);
#endif
@@ -168,7 +168,7 @@ main(argc, argv)
nofork = 1;
break;
case 'k':
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
strncpy(my_realm, optarg, REALM_SZ);
#endif
break;
@@ -186,7 +186,7 @@ main(argc, argv)
}
}
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
/* if there is no readable srvtab and we are not standalone, there
is no possible way we can succeed, so we exit */
@@ -206,7 +206,7 @@ main(argc, argv)
exit(1);
}
}
-#endif /* ZEPHYR_USES_KERBEROS */
+#endif /* HAVE_KRB4 */
#ifndef DEBUG
if (!nofork)
@@ -297,7 +297,7 @@ main(argc, argv)
/* Reinitialize t_local now that initialization is done. */
gettimeofday(&t_local, NULL);
uptime = NOW;
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
timer_set_rel(SWEEP_INTERVAL, sweep_ticket_hash_table, NULL);
#endif
@@ -375,7 +375,7 @@ initialize()
server_init();
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
krb_set_tkt_string(tkt_file);
#endif
realm_init();
@@ -502,7 +502,7 @@ bye(sig)
{
server_shutdown(); /* tell other servers */
hostm_shutdown(); /* tell our hosts */
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
dest_tkt();
#endif
syslog(LOG_NOTICE, "goodbye (sig %d)", sig);
diff --git a/server/realm.c b/server/realm.c
index a6f2577..bba624e 100644
--- a/server/realm.c
+++ b/server/realm.c
@@ -18,7 +18,7 @@ static void rlm_nack_cancel __P((ZNotice_t *notice, struct sockaddr_in *who));
static void rlm_new_ticket __P(());
static void rlm_rexmit __P((void *arg));
static Code_t realm_ulocate_dispatch __P((ZNotice_t *notice,int auth,struct sockaddr_in *who,Server *server,Realm *realm));
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
static Code_t ticket_retrieve __P((Realm *realm));
#endif
@@ -448,7 +448,7 @@ realm_init()
abort();
}
memset(&client->addr, 0, sizeof(struct sockaddr_in));
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
memset(&client->session_key, 0, sizeof(client->session_key));
#endif
sprintf(rlmprinc, "%s.%s@%s", SERVER_SERVICE, SERVER_INSTANCE, rlm->name);
@@ -566,7 +566,7 @@ realm_handoff(notice, auth, who, realm, ack_to_sender)
Realm *realm;
int ack_to_sender;
{
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
Code_t retval;
if (!auth) {
@@ -583,9 +583,9 @@ realm_handoff(notice, auth, who, realm, ack_to_sender)
zdbug((LOG_DEBUG, "realm_sendit to realm %s auth %d", realm->name, auth));
/* valid ticket available now, send the message */
realm_sendit_auth(notice, who, auth, realm, ack_to_sender);
-#else /* ZEPHYR_USES_KERBEROS */
+#else /* HAVE_KRB4 */
realm_sendit(notice, who, auth, realm, ack_to_sender);
-#endif /* ZEPHYR_USES_KERBEROS */
+#endif /* HAVE_KRB4 */
}
static void
@@ -731,7 +731,7 @@ realm_dump_realms(fp)
}
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
static void
realm_sendit_auth(notice, who, auth, realm, ack_to_sender)
ZNotice_t *notice;
@@ -1082,5 +1082,5 @@ ticket_retrieve(realm)
return (1);
}
}
-#endif /* ZEPHYR_USES_KERBEROS */
+#endif /* HAVE_KRB4 */
diff --git a/server/server.c b/server/server.c
index 70a06b9..186fbdf 100644
--- a/server/server.c
+++ b/server/server.c
@@ -92,7 +92,7 @@ static Code_t server_register();
#endif
static struct in_addr *get_server_addrs __P((int *number));
-#ifndef ZEPHYR_USES_HESIOD
+#ifndef HAVE_HESIOD
static char **get_server_list __P((char *file));
static void free_server_list __P((char **list));
#endif
@@ -956,7 +956,7 @@ send_stats(who)
/*
* Get a list of server addresses.
-#ifdef ZEPHYR_USES_HESIOD
+#ifdef HAVE_HESIOD
* This list is retrieved from Hesiod.
#else
* This list is read from a file.
@@ -976,7 +976,7 @@ get_server_addrs(number)
struct in_addr *addr;
struct hostent *hp;
-#ifdef ZEPHYR_USES_HESIOD
+#ifdef HAVE_HESIOD
/* get the names from Hesiod */
server_hosts = hes_resolve("zephyr","sloc");
if (!server_hosts)
@@ -1004,13 +1004,13 @@ get_server_addrs(number)
}
}
*number = i;
-#ifndef ZEPHYR_USES_HESIOD
+#ifndef HAVE_HESIOD
free_server_list(server_hosts);
#endif
return addrs;
}
-#ifndef ZEPHYR_USES_HESIOD
+#ifndef HAVE_HESIOD
static int nhosts = 0;
diff --git a/server/subscr.c b/server/subscr.c
index c305c70..140cdf0 100644
--- a/server/subscr.c
+++ b/server/subscr.c
@@ -61,7 +61,7 @@ static const char rcsid_subscr_c[] = "$Id$";
*
*/
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
#ifndef NOENCRYPTION
C_Block serv_key;
Sched serv_ksched;
@@ -839,10 +839,10 @@ subscr_send_subs(client)
{
int i = 0;
Destlist *subs;
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
char buf[512];
C_Block cblock;
-#endif /* ZEPHYR_USES_KERBEROS */
+#endif /* HAVE_KRB4 */
char buf2[512];
char *list[7 * NUM_FIELDS];
int num = 0;
@@ -855,7 +855,7 @@ subscr_send_subs(client)
list[num++] = buf2;
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
#ifdef NOENCRYPTION
memcpy(cblock, client->session_key, sizeof(C_Block));
#else
@@ -873,7 +873,7 @@ subscr_send_subs(client)
zdbug((LOG_DEBUG, "cblock %s", buf));
#endif
}
-#endif /* ZEPHYR_USES_KERBEROS */
+#endif /* HAVE_KRB4 */
retval = bdump_send_list_tcp(SERVACK, &client->addr, ZEPHYR_ADMIN_CLASS,
num > 1 ? "CBLOCK" : "", ADMIN_NEWCLT,
client->principal->string, "", list, num);
diff --git a/server/zsrv_conf.h b/server/zsrv_conf.h
index 2440d1d..9c2cbce 100644
--- a/server/zsrv_conf.h
+++ b/server/zsrv_conf.h
@@ -18,11 +18,11 @@
/* Path names are relative to CONFDIR, except for the class registry. */
-#ifndef ZEPHYR_USES_HESIOD
+#ifndef HAVE_HESIOD
#define SERVER_LIST_FILE "server.list"
#endif
#define REALM_LIST_FILE "realm.list"
-#ifdef ZEPHYR_USES_KERBEROS
+#ifdef HAVE_KRB4
#define ZEPHYR_SRVTAB "srvtab"
#define ZEPHYR_TKFILE "ztkts"
#endif
diff --git a/zhm/zhm.c b/zhm/zhm.c
index becf936..1191460 100644
--- a/zhm/zhm.c
+++ b/zhm/zhm.c
@@ -15,7 +15,7 @@
static const char rcsid_hm_c[] = "$Id$";
-#ifdef ZEPHYR_USES_HESIOD
+#ifdef HAVE_HESIOD
int use_hesiod = 0;
#endif
@@ -141,7 +141,7 @@ char *argv[];
}
serv_list[numserv] = NULL;
}
-#ifdef ZEPHYR_USES_HESIOD
+#ifdef HAVE_HESIOD
else
use_hesiod = 1;
#endif
@@ -246,7 +246,7 @@ static void choose_server()
{
int i = 0;
-#ifdef ZEPHYR_USES_HESIOD
+#ifdef HAVE_HESIOD
if (use_hesiod) {
/* Free up any previously used resources */