Lines Matching refs:ent
39 add_tl_data(kadm5_principal_ent_t ent, int16_t type, in add_tl_data() argument
57 tl->tl_data_next = ent->tl_data; in add_tl_data()
58 ent->tl_data = tl; in add_tl_data()
59 ent->n_tl_data++; in add_tl_data()
75 hdb_entry_ex ent; in kadm5_s_get_principal() local
77 memset(&ent, 0, sizeof(ent)); in kadm5_s_get_principal()
82 HDB_F_DECRYPT|HDB_F_GET_ANY|HDB_F_ADMIN_DATA, 0, &ent); in kadm5_s_get_principal()
89 ret = krb5_copy_principal(context->context, ent.entry.principal, in kadm5_s_get_principal()
93 if(mask & KADM5_PRINC_EXPIRE_TIME && ent.entry.valid_end) in kadm5_s_get_principal()
94 out->princ_expire_time = *ent.entry.valid_end; in kadm5_s_get_principal()
95 if(mask & KADM5_PW_EXPIRATION && ent.entry.pw_end) in kadm5_s_get_principal()
96 out->pw_expiration = *ent.entry.pw_end; in kadm5_s_get_principal()
98 hdb_entry_get_pw_change_time(&ent.entry, &out->last_pwd_change); in kadm5_s_get_principal()
100 out->attributes |= ent.entry.flags.postdate ? 0 : KRB5_KDB_DISALLOW_POSTDATED; in kadm5_s_get_principal()
101 out->attributes |= ent.entry.flags.forwardable ? 0 : KRB5_KDB_DISALLOW_FORWARDABLE; in kadm5_s_get_principal()
102 out->attributes |= ent.entry.flags.initial ? KRB5_KDB_DISALLOW_TGT_BASED : 0; in kadm5_s_get_principal()
103 out->attributes |= ent.entry.flags.renewable ? 0 : KRB5_KDB_DISALLOW_RENEWABLE; in kadm5_s_get_principal()
104 out->attributes |= ent.entry.flags.proxiable ? 0 : KRB5_KDB_DISALLOW_PROXIABLE; in kadm5_s_get_principal()
105 out->attributes |= ent.entry.flags.invalid ? KRB5_KDB_DISALLOW_ALL_TIX : 0; in kadm5_s_get_principal()
106 out->attributes |= ent.entry.flags.require_preauth ? KRB5_KDB_REQUIRES_PRE_AUTH : 0; in kadm5_s_get_principal()
107 out->attributes |= ent.entry.flags.server ? 0 : KRB5_KDB_DISALLOW_SVR; in kadm5_s_get_principal()
108 out->attributes |= ent.entry.flags.change_pw ? KRB5_KDB_PWCHANGE_SERVICE : 0; in kadm5_s_get_principal()
109 out->attributes |= ent.entry.flags.ok_as_delegate ? KRB5_KDB_OK_AS_DELEGATE : 0; in kadm5_s_get_principal()
110 out->attributes |= ent.entry.flags.trusted_for_delegation ? KRB5_KDB_TRUSTED_FOR_DELEGATION : 0; in kadm5_s_get_principal()
111 out->attributes |= ent.entry.flags.allow_kerberos4 ? KRB5_KDB_ALLOW_KERBEROS4 : 0; in kadm5_s_get_principal()
112 out->attributes |= ent.entry.flags.allow_digest ? KRB5_KDB_ALLOW_DIGEST : 0; in kadm5_s_get_principal()
115 if(ent.entry.max_life) in kadm5_s_get_principal()
116 out->max_life = *ent.entry.max_life; in kadm5_s_get_principal()
121 if(ent.entry.modified_by) in kadm5_s_get_principal()
122 out->mod_date = ent.entry.modified_by->time; in kadm5_s_get_principal()
124 out->mod_date = ent.entry.created_by.time; in kadm5_s_get_principal()
127 if(ent.entry.modified_by) { in kadm5_s_get_principal()
128 if (ent.entry.modified_by->principal != NULL) in kadm5_s_get_principal()
130 ent.entry.modified_by->principal, in kadm5_s_get_principal()
132 } else if(ent.entry.created_by.principal != NULL) in kadm5_s_get_principal()
134 ent.entry.created_by.principal, in kadm5_s_get_principal()
143 out->kvno = ent.entry.kvno; in kadm5_s_get_principal()
147 for(n = 0; n < ent.entry.keys.len; n++) in kadm5_s_get_principal()
148 if(ent.entry.keys.val[n].mkvno) { in kadm5_s_get_principal()
149 out->mkvno = *ent.entry.keys.val[n].mkvno; /* XXX this isn't right */ in kadm5_s_get_principal()
166 if(ent.entry.max_renew) in kadm5_s_get_principal()
167 out->max_renewable_life = *ent.entry.max_renew; in kadm5_s_get_principal()
177 krb5_get_pw_salt(context->context, ent.entry.principal, &salt); in kadm5_s_get_principal()
178 out->key_data = malloc(ent.entry.keys.len * sizeof(*out->key_data)); in kadm5_s_get_principal()
179 if (out->key_data == NULL && ent.entry.keys.len != 0) { in kadm5_s_get_principal()
183 for(i = 0; i < ent.entry.keys.len; i++){ in kadm5_s_get_principal()
184 key = &ent.entry.keys.val[i]; in kadm5_s_get_principal()
187 kd->key_data_kvno = ent.entry.kvno; in kadm5_s_get_principal()
229 ret = hdb_entry_get_pw_change_time(&ent.entry, &last_pw_expire); in kadm5_s_get_principal()
249 context->db, &ent.entry, &pw); in kadm5_s_get_principal()
257 ret = hdb_entry_get_pkinit_acl(&ent.entry, &acl); in kadm5_s_get_principal()
283 ret = hdb_entry_get_aliases(&ent.entry, &aliases); in kadm5_s_get_principal()
311 hdb_free_entry(context->context, &ent); in kadm5_s_get_principal()