~ubuntu-branches/ubuntu/raring/heimdal/raring

« back to all changes in this revision

Viewing changes to kadmin/add_enctype.c

  • Committer: Package Import Robot
  • Author(s): Jelmer Vernooij
  • Date: 2011-10-03 23:50:05 UTC
  • mfrom: (1.1.15) (2.2.23 sid)
  • Revision ID: package-import@ubuntu.com-20111003235005-0voibbgdhyqmtp6w
Tags: 1.5.dfsg.1-3
Add conflicts with kcc to heimdal-clients. Closes: #644138

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
        goto out2;
79
79
    }
80
80
 
81
 
    /* The principal might have zero keys, but it will still have a kvno! */
82
81
    ret = kadm5_get_principal(kadm_handle, princ_ent, &princ,
83
 
                              KADM5_KVNO | KADM5_PRINCIPAL | KADM5_KEY_DATA);
 
82
                              KADM5_PRINCIPAL | KADM5_KEY_DATA);
84
83
    if (ret) {
85
84
        krb5_free_principal (context, princ_ent);
86
85
        krb5_warnx (context, "no such principal: %s", princ_name);
99
98
 
100
99
        for (j = 0; j < n_etypes; ++j) {
101
100
            if (etypes[j] == key->key_data_type[0]) {
102
 
                /* XXX Should this be an error?  The admin can del_enctype... */
103
101
                krb5_warnx(context, "enctype %d already exists",
104
102
                           (int)etypes[j]);
105
103
                free(new_key_data);
115
113
 
116
114
        memset(&new_key_data[n], 0, sizeof(new_key_data[n]));
117
115
        new_key_data[n].key_data_ver = 2;
118
 
        new_key_data[n].key_data_kvno = princ.kvno;
 
116
        new_key_data[n].key_data_kvno = 0;
119
117
 
120
118
        ret = krb5_generate_random_keyblock (context, etypes[i], &keyblock);
121
119
        if (ret) {