]> andersk Git - moira.git/blobdiff - server/mr_sauth.c
Build without krb4 if it's unavailable.
[moira.git] / server / mr_sauth.c
index 17fe74f78c82addefb44f9b5f5c35501f49b65cd..2cc1a486f81c3baac54a3c624b04ea7b1ac6092b 100644 (file)
@@ -28,6 +28,7 @@ extern krb5_context context;
 static int set_client(client *cl, char *kname,
                      char *name, char *inst, char *realm);
 
+#ifdef HAVE_KRB4
 typedef struct _replay_cache {
   KTEXT_ST auth;
   time_t expires;
@@ -35,6 +36,7 @@ typedef struct _replay_cache {
 } replay_cache;
 
 replay_cache *rcache = NULL;
+#endif
 
 /*
  * Handle a MOIRA_AUTH RPC request.
@@ -46,6 +48,7 @@ replay_cache *rcache = NULL;
 
 void do_auth(client *cl)
 {
+#ifdef HAVE_KRB4
   KTEXT_ST auth;
   AUTH_DAT ad;
   int status;
@@ -123,6 +126,9 @@ void do_auth(client *cl)
     client_reply(cl, status);
   else
     client_reply(cl, MR_USER_AUTH);
+#else
+  client_reply(cl, MR_NO_KRB4);
+#endif
 }
 
 void do_proxy(client *cl)
@@ -137,7 +143,7 @@ void do_proxy(client *cl)
       return;
     }
 
-  if (kname_parse(name, inst, realm, cl->req.mr_argv[0]) != KSUCCESS)
+  if (mr_kname_parse(name, inst, realm, cl->req.mr_argv[0]) != 0)
     {
       com_err(whoami, KE_KNAME_FMT, "while parsing proxy name %s",
              cl->req.mr_argv);
This page took 1.550138 seconds and 4 git commands to generate.