Fixed krb5-bugs [0437]:
authorTheodore Tso <tytso@mit.edu>
Fri, 11 Mar 1994 23:06:26 +0000 (23:06 +0000)
committerTheodore Tso <tytso@mit.edu>
Fri, 11 Mar 1994 23:06:26 +0000 (23:06 +0000)
        The norealm_salt macro, which is defined in
src/kdc/kdc_util.h, src/admin/edit/kdb5_edit.c, and
Fixed krb5-bugs [0437]:

        The norealm_salt macro, which is defined in
src/kdc/kdc_util.h, src/admin/edit/kdb5_edit.c, and
src/kadmin/server/adm_funcs.c, is wrong and needs to be fixed.  It
will cause a coredump if it's ever actually invoked.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3451 dc483132-0cff-0310-8789-dd5450dbe970

src/admin/edit/kdb5_edit.c
src/kadmin/server/adm_funcs.c
src/kdc/do_as_req.c

index 8d6aa50eacd0e6f3839bc1490746bbd5649d5f64..21227ff773696b6497009a8caea78f2ec3b883d7 100644 (file)
@@ -45,8 +45,6 @@ static char rcsid_kdb_edit_c[] =
 
 #include "./kdb5_edit.h"
 
-#define norealm_salt(princ, retdata) krb5_principal2salt(&(princ)[1], retdata)
-
 struct mblock mblock = {                               /* XXX */
     KRB5_KDB_MAX_LIFE,
     KRB5_KDB_MAX_RLIFE,
@@ -1282,7 +1280,8 @@ OLDDECLARG(int, salttype)
        salt.saltdata.length = 0;
        break;
     case KRB5_KDB_SALTTYPE_NOREALM:
-       if (retval = norealm_salt(string_princ, &salt.saltdata)) {
+       if (retval = krb5_principal2salt_norealm(string_princ,
+                                                &salt.saltdata)) {
            com_err(cmdname, retval,
                    "while converting principal to salt for '%s'", newprinc);
            return;
index 9c1c5fce4b68b178a74d85e513782d53d4b29c3b..508c2095314ef6c5a74a7c745feb1e6a22f6adb1 100644 (file)
@@ -65,8 +65,6 @@ struct saltblock {
 extern krb5_encrypt_block master_encblock;
 extern krb5_keyblock master_keyblock;
 
-#define norealm_salt(princ, retdata) krb5_principal2salt(&(princ)[1], retdata)
-
 struct mblock {
     krb5_deltat max_life;
     krb5_deltat max_rlife;
@@ -348,7 +346,8 @@ OLDDECLARG(krb5_db_entry *, entry)
        break;
 
     case KRB5_KDB_SALTTYPE_NOREALM:
-       if (retval = norealm_salt(string_princ, &salt.saltdata)) {
+       if (retval = krb5_principal2salt_norealm(string_princ,
+                                                &salt.saltdata)) {
            com_err("adm_enter_pwd_key", retval,
                    "while converting principal to salt for '%s'", newprinc);
            return(KRB_ERR_GENERIC);
index 44289e4445c845d6b891708ac57ade761ed6f8df..991518932abebcf65e552e6467e7a9b052a22f69 100644 (file)
@@ -448,7 +448,8 @@ ticket_reply.enc_part2 = &enc_tkt_reply;
            padat_tmp[0]->length = 0;
            break;
        case KRB5_KDB_SALTTYPE_NOREALM:
-           if (retval = norealm_salt(request->client, &data_bar)) {
+           if (retval = krb5_principal2salt_norealm(request->client,
+                                                    &data_bar)) {
                cleanup();
                return retval;
            }