]> andersk Git - moira.git/blobdiff - update/auth_001.c
punt smskeyu.c
[moira.git] / update / auth_001.c
index ab5261fbb45623207ed616ef9a1a2cda59ecba96..d671c319d3b26448d867f04d8d76112529a07b65 100644 (file)
@@ -2,17 +2,20 @@
  *     $Source$
  *     $Header$
  */
+/*  (c) Copyright 1988 by the Massachusetts Institute of Technology. */
+/*  For copying and distribution information, please see the file */
+/*  <mit-copyright.h>. */
 
 #ifndef lint
 static char *rcsid_auth_001_c = "$Header$";
 #endif lint
 
+#include <mit-copyright.h>
 #include <stdio.h>
 #include <strings.h>
-#include "gdb.h"
-#include "smsu_int.h"
-#include "kludge.h"
+#include <gdb.h>
 #include <krb.h>
+#include <krb_et.h>
 #include <netinet/in.h>
 #include <errno.h>
 
@@ -57,18 +60,18 @@ auth_001(str)
     ticket_st.mbz = 0;
     ticket_st.length = MAX_STRING_SIZE(data);
     bcopy(STRING_DATA(data), ticket_st.dat, MAX_STRING_SIZE(data));
-    code = rd_ap_req(&ticket_st, service,
+    code = krb_rd_req(&ticket_st, service,
                     PrincipalHostname(host), 0,
-                    &ad, "/etc/srvtab");
+                    &ad, KEYFILE);
     if (code) {
-       code = krb_err_frob(code);
+       code += ERROR_TABLE_BASE_krb;
        strcpy(ad.pname, qmark);
        strcpy(ad.pinst, qmark);
        strcpy(ad.prealm, qmark);
        goto auth_failed;
     }
-    if (get_krbrlm(realm,0))
-       realm[0] = '\0';
+    if (krb_get_lrealm(realm,1))
+       strcpy(realm, KRB_REALM);
     code = EPERM;
     if (strcmp(master, ad.pname))
        goto auth_failed;
This page took 0.09677 seconds and 4 git commands to generate.