Lines Matching defs:pent

40 static int build_entrylist(entry_t *pent, entrylist_t **pplist);
45 static int parse_sup_dis_list(const char *buf, entry_t *pent);
106 entry_t *pent = NULL;
112 pent = calloc(1, sizeof (entry_t));
113 if (pent == NULL) {
118 (void) strlcpy(pent->name, provname, MAXNAMELEN);
119 pent->suplist = NULL;
120 pent->sup_count = 0;
121 pent->dislist = NULL;
122 pent->dis_count = 0;
123 pent->load = B_TRUE;
125 return (pent);
176 * pent: the entry for the disabledlist. This is an IN/OUT argument.
181 parse_sup_dis_list(const char *buf, entry_t *pent)
218 if (pent->suplist != NULL) {
223 pent->suplist = phead = pmech;
226 if (pent->dislist != NULL) {
231 pent->dislist = phead = pmech;
250 pent->sup_count = count;
252 pent->dis_count = count;
274 entry_t *pent = NULL;
285 pent = create_entry(token1);
286 if (pent == NULL) {
293 free_entry(pent);
298 pent->load = B_FALSE; /* cryptoadm unload */
316 if ((rc = parse_sup_dis_list(token2, pent)) != SUCCESS) {
317 free_entry(pent);
323 pent)) != SUCCESS)) {
324 free_entry(pent);
329 *ppent = pent;
336 * If the entry list pplist is NULL, create the linked list with pent as the
340 build_entrylist(entry_t *pent, entrylist_t **pplist)
350 pentlist->pent = pent;
382 if (strcmp(entrylist->pent->name, provname) == 0) {
384 pent1 = entrylist->pent;
405 free_entry(entry_t *pent)
407 if (pent == NULL) {
410 free_mechlist(pent->suplist);
411 free_mechlist(pent->dislist);
412 free(pent);
428 free_entry(entrylist->pent);
459 ent2str(entry_t *pent)
465 if (pent == NULL) {
474 if (strlcpy(buf, pent->name, BUFSIZ) >= BUFSIZ) {
479 if (!pent->load) { /* add "unload" keyword */
494 pcur = pent->suplist;
527 pcur = pent->dislist;
580 entry_t *pent;
586 pent = *ppent;
587 if (pent == NULL) {
592 free_mechlist(pent->dislist);
593 pent->dis_count = 0;
594 pent->dislist = NULL;
607 phead = pcur = pent->dislist;
619 pent->dislist = pent->dislist->next;
625 pent->dis_count--;
630 pent->name);
635 if (pent->dis_count == 0) {
636 pent->dislist = NULL;
705 entry_t *pent = NULL;
727 if ((rc = interpret(buffer, &pent)) == SUCCESS) {
728 if (is_device(pent->name)) {
729 rc = build_entrylist(pent, ppdevlist);
731 rc = build_entrylist(pent, ppsoftlist);
741 free_entry(pent);
884 entry_t *pent = NULL;
895 pent = getent(provname, phardlist);
897 pent = getent(provname, psoftlist);
905 return (pent);
947 update_kcfconf(entry_t *pent, int update_mode)
962 if (pent == NULL) {
974 if ((new_str = ent2str(pent)) == NULL) {
1066 if (strcmp(pent->name, name) == 0) {
1162 entry_t *pent;
1168 pent = *ppent;
1169 if (pent == NULL) {
1174 free_mechlist(pent->dislist);
1175 pent->dis_count = get_mech_count(infolist);
1176 if (!(pent->dislist = dup_mechlist(infolist))) {
1195 plist->name, pent->name);
1196 } else if (!is_in_list(plist->name, pent->dislist)) {
1203 if (pent->dislist == NULL) {
1204 pent->dislist = pmech;
1206 phead = pent->dislist;
1207 pent->dislist = pmech;
1210 pent->dis_count++;
1269 * If pent is NULL, the provider doesn't have a kcf.conf entry.
1272 print_kef_policy(char *provname, entry_t *pent, boolean_t has_random,
1278 if (pent != NULL) {
1279 rnd_disabled = filter_mechlist(&pent->dislist, RANDOM);
1280 ptr = pent->dislist;