Lines Matching refs:policy
48 * Function to create password policy object.
52 krb5_ldap_create_password_policy (context, policy)
54 osa_policy_ent_t policy;
68 if (policy == NULL || policy->name == NULL)
74 st = krb5_ldap_name_to_policydn (context, policy->name, &policy_dn);
82 krb5_set_error_message(context, st, gettext("Invalid password policy DN syntax"));
95 (signed) policy->pw_max_life)) != 0)
97 (signed) policy->pw_min_life)) != 0)
99 (signed) policy->pw_min_classes)) != 0)
101 (signed) policy->pw_min_length)) != 0)
103 (signed) policy->pw_history_num)) != 0))
106 /* password policy object creation */
124 * Function to modify password policy object.
128 krb5_ldap_put_password_policy (context, policy)
130 osa_policy_ent_t policy;
144 if (policy == NULL || policy->name == NULL)
150 st = krb5_ldap_name_to_policydn (context, policy->name, &policy_dn);
155 (signed) policy->pw_max_life)) != 0)
157 (signed) policy->pw_min_life)) != 0)
159 (signed) policy->pw_min_classes)) != 0)
161 (signed) policy->pw_min_length)) != 0)
163 (signed) policy->pw_history_num)) != 0))
166 /* modify the password policy object. */
170 * management of only such policy objects.
224 osa_policy_ent_t *policy,
241 *policy = NULL;
246 *(policy) = (osa_policy_ent_t) malloc(sizeof(osa_policy_ent_rec));
247 if (*policy == NULL) {
251 memset(*policy, 0, sizeof(osa_policy_ent_rec));
256 (*policy)->name = strdup(name);
257 CHECK_NULL((*policy)->name);
258 (*policy)->version = 1;
263 if ((st = populate_policy(context, ld, ent, pol_name, *policy)) != 0)
266 krb5_ldap_get_value(ld, ent, "krbmaxpwdlife", &((*policy)->pw_max_life));
267 krb5_ldap_get_value(ld, ent, "krbminpwdlife", &((*policy)->pw_min_life));
268 krb5_ldap_get_value(ld, ent, "krbpwdmindiffchars", &((*policy)->pw_min_classes));
269 krb5_ldap_get_value(ld, ent, "krbpwdminlength", &((*policy)->pw_min_length));
270 krb5_ldap_get_value(ld, ent, "krbpwdhistorylength", &((*policy)->pw_history_num));
276 &(*policy)->policy_refcnt,
284 if (*policy != NULL) {
285 krb5_ldap_free_password_policy(context, *policy);
286 *policy = NULL;
299 krb5_ldap_get_password_policy (context, name, policy, cnt)
302 osa_policy_ent_t *policy;
321 st = krb5_ldap_get_password_policy_from_dn(context, name, policy_dn, policy, cnt);
330 krb5_ldap_delete_password_policy (context, policy)
332 char *policy;
346 if (policy == NULL)
352 st = krb5_ldap_name_to_policydn (context, policy, &policy_dn);
356 /* Ensure that the object is a password policy */
386 char *policy=NULL;
409 st = krb5_ldap_get_string(ld, ent, "cn", &policy, &attr_present);
418 if ((st = populate_policy(context, ld, ent, policy, entry)) != 0)
421 entry->name = policy;
432 policy,
439 /* XXX this will free policy so don't free it */