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

« back to all changes in this revision

Viewing changes to kadmin/ank.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:
68
68
                   int rand_password,
69
69
                   int use_defaults,
70
70
                   char *password,
71
 
                   char *policy,
72
71
                   krb5_key_data *key_data,
73
72
                   const char *max_ticket_life,
74
73
                   const char *max_renewable_life,
95
94
 
96
95
    ret = set_entry(context, &princ, &mask,
97
96
                    max_ticket_life, max_renewable_life,
98
 
                    expiration, pw_expiration, attributes, policy);
 
97
                    expiration, pw_expiration, attributes);
99
98
    if (ret)
100
99
        goto out;
101
100
 
160
159
        kadm5_get_principal(kadm_handle, princ_ent, &princ,
161
160
                            KADM5_PRINCIPAL | KADM5_KVNO | KADM5_ATTRIBUTES);
162
161
        princ.attributes &= (~KRB5_KDB_DISALLOW_ALL_TIX);
163
 
        /*
164
 
         * Updating kvno w/o key data and vice-versa gives _kadm5_setup_entry()
165
 
         * and _kadm5_set_keys2() headaches.  But we used to, so we handle
166
 
         * this in in those two functions.  Might as well leave this code as
167
 
         * it was then.
168
 
         */
169
162
        princ.kvno = 1;
170
163
        kadm5_modify_principal(kadm_handle, &princ,
171
164
                               KADM5_ATTRIBUTES | KADM5_KVNO);
 
165
        kadm5_free_principal_ent(kadm_handle, &princ);
172
166
    } else if (key_data) {
173
167
        ret = kadm5_chpass_principal_with_key (kadm_handle, princ_ent,
174
168
                                               3, key_data);
179
173
                            KADM5_PRINCIPAL | KADM5_ATTRIBUTES);
180
174
        princ.attributes &= (~KRB5_KDB_DISALLOW_ALL_TIX);
181
175
        kadm5_modify_principal(kadm_handle, &princ, KADM5_ATTRIBUTES);
 
176
        kadm5_free_principal_ent(kadm_handle, &princ);
182
177
    } else if (rand_password) {
183
178
        char *princ_name;
184
179
 
187
182
        free (princ_name);
188
183
    }
189
184
out:
190
 
    kadm5_free_principal_ent(kadm_handle, &princ); /* frees princ_ent */
 
185
    if (princ_ent)
 
186
        krb5_free_principal (context, princ_ent);
191
187
    if(default_ent)
192
188
        kadm5_free_principal_ent (kadm_handle, default_ent);
193
189
    if (password != NULL)
249
245
                                 opt->random_password_flag,
250
246
                                 opt->use_defaults_flag,
251
247
                                 opt->password_string,
252
 
                                 opt->policy_string,
253
248
                                 kdp,
254
249
                                 opt->max_ticket_life_string,
255
250
                                 opt->max_renewable_life_string,