]> andersk Git - moira.git/blobdiff - update/ticket.c
Build without krb4 if it's unavailable.
[moira.git] / update / ticket.c
index 77e2b1c1ef4ddc2d7b720410f0909ef51efa8e3e..9eb47c7e5916a72e7792286a15c0f08cc4f7699f 100644 (file)
 #include <stdio.h>
 #include <string.h>
 
+#ifdef HAVE_KRB4
 #include <krb.h>
+#else
+#define KTEXT void*
+#endif
 #include <krb5.h>
 #include <update.h>
 
 RCSID("$Header$");
 
+#ifdef HAVE_KRB4
 static char realm[REALM_SZ];
 static char master[INST_SZ] = "sms";
 static char service[ANAME_SZ] = "rcmd";
 des_cblock session;
+#endif
 krb5_context context = NULL;
 
+#ifdef HAVE_KRB4
 static int get_mr_tgt(void);
+#endif
 
 int get_mr_krb5_update_ticket(char *host, krb5_data auth)
 {
@@ -58,6 +66,7 @@ int get_mr_krb5_update_ticket(char *host, krb5_data auth)
 
 int get_mr_update_ticket(char *host, KTEXT ticket)
 {
+#ifdef HAVE_KRB4
   int code, pass;
   char phost[BUFSIZ];
   CREDENTIALS cr;
@@ -93,8 +102,12 @@ try_it:
       memcpy(session, cr.session, sizeof(session));
     }
   return code;
+#else
+  return MR_NO_KRB4;
+#endif
 }
 
+#ifdef HAVE_KRB4
 static int get_mr_tgt(void)
 {
   int code;
@@ -109,3 +122,4 @@ static int get_mr_tgt(void)
   else
     return code + ERROR_TABLE_BASE_krb;
 }
+#endif
This page took 0.031144 seconds and 4 git commands to generate.