Lines Matching defs:policy

39  * Create / Delete / Modify / View / List policy objects.
99 * This function will create a ticket policy object with the
124 /* Allocate memory for policy parameters structure */
272 } else { /* Any other argument must be policy DN */
273 /* First check if policy DN is already provided --
275 if (policyparams->policy != NULL)
278 /* If not present already, fill up policy DN */
279 policyparams->policy = strdup(argv[i]);
280 if (policyparams->policy == NULL) {
282 com_err(me, retval, gettext("while creating policy object"));
288 /* policy DN is a mandatory argument. If not provided, print usage */
289 if (policyparams->policy == NULL)
318 com_err(me, retval, gettext("while creating policy object"));
328 * This function will destroy the specified ticket policy
343 char *policy = NULL;
356 } else { /* Any other argument must be policy DN */
357 /* First check if policy DN is already provided --
359 if (policy != NULL)
362 /* If not present already, fill up policy DN */
363 policy = strdup(argv[i]);
364 if (policy == NULL) {
366 com_err(me, retval, gettext("while destroying policy object"));
372 if (policy == NULL)
376 printf(gettext("This will delete the policy object '%s', are you sure?\n"), policy);
393 if ((retval = krb5_ldap_read_policy(util_context, policy, &policyparams, &mask)))
397 if ((retval = krb5_ldap_delete_policy(util_context, policy)))
400 printf(gettext("** policy object '%s' deleted.\n"), policy);
414 if (policy) {
415 free (policy);
424 com_err(me, retval, gettext("while destroying policy object"));
435 * policy object.
449 char *policy = NULL;
457 addition to 'modify_policy' and policy DN */
462 /* Parse all arguments, only to pick up policy DN (Pass 1) */
484 } else { /* Any other argument must be policy DN */
485 /* First check if policy DN is already provided --
487 if (policy != NULL)
490 /* If not present already, fill up policy DN */
491 policy = strdup(argv[i]);
492 if (policy == NULL) {
494 com_err(me, retval, gettext("while modifying policy object"));
500 if (policy == NULL)
506 retval = krb5_ldap_read_policy(util_context, policy, &policyparams, &in_mask);
508 com_err(me, retval, gettext("while reading information of policy '%s'"), policy);
515 /* Parse all arguments, but skip policy DN (Pass 2) */
654 /* Any other argument must be policy DN
675 if (policy)
676 free (policy);
683 com_err(me, retval, gettext("while modifying policy object"));
693 * This function will display information about the given policy object,
707 char *policy = NULL;
714 policy = strdup(argv[1]);
715 if (policy == NULL) {
716 com_err(me, ENOMEM, gettext("while viewing policy"));
724 if ((retval = krb5_ldap_read_policy(util_context, policy, &policyparams, &mask))) {
725 com_err(me, retval, gettext("while viewing policy '%s'"), policy);
740 if (policy)
741 free (policy);
752 * This function will print the policy object information to the
760 /* Print the policy DN */
761 printf("%25s: %s\n", gettext("Ticket policy"), policyparams->policy);
817 * This function will list the DNs of policy objects under a specific
868 com_err(me, retval, gettext("while listing policy objects"));