]> andersk Git - moira.git/blobdiff - reg_svr/admin_call.c
Case-insensitive stuff.
[moira.git] / reg_svr / admin_call.c
index d0650e86be100e19223c4acadd25bcdde4c92404..ff6d2ea6ea0cba63e83ef508ee653cf19fa695f2 100644 (file)
@@ -4,6 +4,8 @@
  *     $Header$
  *
  *     Copyright (C) 1987 by the Massachusetts Institute of Technology
+ *     For copying and distribution information, please see the file
+ *     <mit-copyright.h>.
  *
  *     Utility functions for communication with the Kerberos admin_server
  *
@@ -16,6 +18,7 @@
 static char *rcsid_admin_call_c = "$Header$";
 #endif lint
 
+#include <mit-copyright.h>
 #include <sys/errno.h>
 #include <sys/types.h>
 #include <sys/time.h>
@@ -32,8 +35,8 @@ static char *rcsid_admin_call_c = "$Header$";
 #include "admin_server.h"
 #include "prot.h"
 #include "krb.h"
+#include "krb_et.h"
 
-extern int krb_err_base;       /* Offset between com_err and kerberos codes */
 extern int errno;              /* System call error numbers */
 
 extern long gethostid();
@@ -63,9 +66,9 @@ int admin_call_init()
        struct hostent *hp;     /* host to talk to */
        struct servent *sp;     /* service to talk to */
 
-       init_kadm_err_tbl();
-       if (status = get_krbrlm(krbrlm, 1)) {
-           status += krb_err_base;
+       initialize_kadm_error_table();
+       if (status = krb_get_lrealm(krbrlm, 1)) {
+           status += ERROR_TABLE_BASE_krb;
            goto punt;
        }
 
@@ -73,8 +76,8 @@ int admin_call_init()
         * Locate server.
         */
 
-       if (status = get_krbhst(krbhost, krbrlm, 1)) {
-           status += krb_err_base;
+       if (status = krb_get_krbhst(krbhost, krbrlm, 1)) {
+           status += ERROR_TABLE_BASE_krb;
            goto punt;
        }
        hp = gethostbyname(krbhost);
@@ -194,7 +197,7 @@ admin_call(opcode, pname, old_passwd, new_passwd, crypt_passwd)
      */
 
     if (status = krb_get_cred("changepw", krbhost, krbrlm, &cred)) {
-       status += krb_err_base;
+       status += ERROR_TABLE_BASE_krb;
        goto bad;
     }
 
@@ -265,7 +268,7 @@ admin_call(opcode, pname, old_passwd, new_passwd, crypt_passwd)
 
     if (status = krb_mk_req(&authent, "changepw", krbhost, krbrlm,
                           checksum)) {
-       status += krb_err_base;
+       status += ERROR_TABLE_BASE_krb;
        goto bad;
     }
 
@@ -364,7 +367,7 @@ admin_call(opcode, pname, old_passwd, new_passwd, crypt_passwd)
                            &admin_addr, &my_addr,
                            &msg_data);
     if (status) {
-       status += krb_err_base;
+       status += ERROR_TABLE_BASE_krb;
        goto bad;
     }
     bp = msg_data.app_data;
@@ -415,14 +418,3 @@ static u_char *strapp(dest, source, end)
        return dest + length;
     }
 }
-
-/*
- * Local Variables:
- * mode: c
- * c-indent-level: 4
- * c-continued-statement-offset: 4
- * c-brace-offset: -4
- * c-argdecl-indent: 4
- * c-label-offset: -4
- * End:
- */
This page took 0.035773 seconds and 4 git commands to generate.