Lines Matching refs:entry

47  *      entry   (input) The policy entry to be written out to the DB.
48 * mask (input) Specifies which fields in entry are to ge written out
53 * Entry must be a valid principal entry, and mask have a valid value.
64 kadm5_policy_ent_t entry, long mask)
73 return kadm5_create_policy_internal(server_handle, entry, mask);
82 * entry (input) The policy entry to be written out to the DB.
83 * mask (input) Specifies which fields in entry are to ge written out
88 * Entry must be a valid principal entry, and mask have a valid value.
98 kadm5_policy_ent_t entry, long mask)
107 if ((entry == (kadm5_policy_ent_t) NULL) || (entry->policy == NULL))
109 if(strlen(entry->policy) == 0)
114 pent.name = entry->policy;
115 p = entry->policy;
125 pent.pw_max_life = entry->pw_max_life;
130 if(entry->pw_min_life > entry->pw_max_life && entry->pw_max_life != 0)
133 pent.pw_min_life = entry->pw_min_life;
138 if(entry->pw_min_length < MIN_PW_LENGTH)
140 pent.pw_min_length = entry->pw_min_length;
145 if(entry->pw_min_classes > MAX_PW_CLASSES || entry->pw_min_classes < MIN_PW_CLASSES)
147 pent.pw_min_classes = entry->pw_min_classes;
152 if(entry->pw_history_num < MIN_PW_HISTORY)
155 pent.pw_history_num = entry->pw_history_num;
160 pent.policy_refcnt = entry->policy_refcnt;
166 pent.pw_max_fail = entry->pw_max_fail;
170 pent.pw_failcnt_interval = entry->pw_failcnt_interval;
174 pent.pw_lockout_duration = entry->pw_lockout_duration;
191 osa_policy_ent_t entry;
203 if((ret = krb5_db_get_policy(handle->context, name, &entry,&cnt)))
208 if(entry->policy_refcnt != 0) {
209 krb5_db_free_policy(handle->context, entry);
212 krb5_db_free_policy(handle->context, entry);
221 kadm5_policy_ent_t entry, long mask)
230 return kadm5_modify_policy_internal(server_handle, entry, mask);
235 kadm5_policy_ent_t entry, long mask)
244 if((entry == (kadm5_policy_ent_t) NULL) || (entry->policy == NULL))
246 if(strlen(entry->policy) == 0)
251 if ((ret = krb5_db_get_policy(handle->context, entry->policy, &p, &cnt)))
257 p->pw_max_life = entry->pw_max_life;
259 if(entry->pw_min_life > p->pw_max_life && p->pw_max_life != 0) {
263 p->pw_min_life = entry->pw_min_life;
266 if(entry->pw_min_length < MIN_PW_LENGTH) {
270 p->pw_min_length = entry->pw_min_length;
273 if(entry->pw_min_classes > MAX_PW_CLASSES ||
274 entry->pw_min_classes < MIN_PW_CLASSES) {
278 p->pw_min_classes = entry->pw_min_classes;
281 if(entry->pw_history_num < MIN_PW_HISTORY) {
285 p->pw_history_num = entry->pw_history_num;
288 p->policy_refcnt = entry->policy_refcnt;
291 p->pw_max_fail = entry->pw_max_fail;
293 p->pw_failcnt_interval = entry->pw_failcnt_interval;
295 p->pw_lockout_duration = entry->pw_lockout_duration;
304 kadm5_policy_ent_t entry)
325 if ((entry->policy = strdup(t->name)) == NULL) {
329 entry->pw_min_life = t->pw_min_life;
330 entry->pw_max_life = t->pw_max_life;
331 entry->pw_min_length = t->pw_min_length;
332 entry->pw_min_classes = t->pw_min_classes;
333 entry->pw_history_num = t->pw_history_num;
334 entry->policy_refcnt = t->policy_refcnt;
336 entry->pw_max_fail = t->pw_max_fail;
337 entry->pw_failcnt_interval = t->pw_failcnt_interval;
338 entry->pw_lockout_duration = t->pw_lockout_duration;