Allow for the use of other K/M encryption types. Try to look it up in
authorRichard Basch <probe@mit.edu>
Mon, 22 Jan 1996 04:56:49 +0000 (04:56 +0000)
committerRichard Basch <probe@mit.edu>
Mon, 22 Jan 1996 04:56:49 +0000 (04:56 +0000)
the stash file if it is being invoked in non-interactive mode.

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

src/kadmin.v4/server/kadm_ser_wrap.c

index 5d80bb1fe61a2831e45f38459884c5a4e55ea0c0..7c373b3d6b688e022ef60c4d18277017d9425ba8 100644 (file)
@@ -76,10 +76,13 @@ kadm_ser_init(inter, realm)
     server_parm.admin_addr.sin_port = sep->s_port;
     /* setting up the database */
     mkey_name = KRB5_KDB_M_NAME;
-    server_parm.master_keyblock.enctype = ENCTYPE_DES_CBC_MD5;
-    
-    krb5_use_enctype(kadm_context, &server_parm.master_encblock, 
-                   server_parm.master_keyblock.enctype);
+
+    if (inter == 1) {
+       server_parm.master_keyblock.enctype = ENCTYPE_DES_CBC_MD5;
+       krb5_use_enctype(kadm_context, &server_parm.master_encblock, 
+                        server_parm.master_keyblock.enctype);
+    } else
+       server_parm.master_keyblock.enctype = ENCTYPE_UNKNOWN;
     
     retval = krb5_db_setup_mkey_name(kadm_context, mkey_name, realm,
                                     (char **) 0,
@@ -108,9 +111,7 @@ kadm_ser_init(inter, realm)
 
     retval = krb5_dbe_find_enctype(kadm_context,
                                   &master_entry,
-                                  ENCTYPE_DES_CBC_MD5,
-                                  -1,
-                                  -1,
+                                  -1, -1, -1,
                                   &kdatap);
     if (retval)
         return KRB5_PROG_KEYTYPE_NOSUPP;