Lines Matching refs:mp

260 sf_free_mech_ent(mechanism_t *mp)
262 if (mp) {
263 if (mp->mechname)
264 free(mp->mechname);
265 if (mp->alias)
266 free(mp->alias);
267 if (mp->qop)
268 free(mp->qop);
269 free(mp);
463 equal_entries(const mechanism_t *mp, const mechanism_t *tp)
465 if (mp && tp) {
466 if (mp->keylen != tp->keylen)
468 if (mp->algtype != tp->algtype)
472 if (!mp->mechname && !tp->mechname)
475 if (!mp->mechname || !tp->mechname)
477 if (strcmp(mp->mechname, tp->mechname) != 0)
480 if (!mp->alias && !tp->alias)
482 if (!mp->alias || !tp->alias)
484 if (strcmp(mp->alias, tp->alias) != 0)
492 sf_copy_mech_ent(mechanism_t *mp)
494 mechanism_t *tp = calloc(1, sizeof (*mp));
496 if (!mp || !tp)
499 tp->mechname = mp->mechname ? strdup(mp->mechname) : NULL;
500 tp->alias = mp->alias ? strdup(mp->alias) : NULL;
501 tp->qop = mp->qop ? strdup(mp->qop) : NULL;
502 tp->keylen = mp->keylen;
503 tp->algtype = mp->algtype;
504 tp->secserv = mp->secserv;
514 member_of_dups(mechanism_t **t, const mechanism_t *mp)
519 if (equal_entries(mp, *t))
553 mechanism_t *mp;
582 while (mp = get_secfile_ent(fptr)) {
587 if (!(AUTH_DES_COMPAT_CHK(mp) ||
588 (NIS_SEC_CF_GSS_MECH(mp) &&
589 rpc_gss_is_installed(mp->mechname)))) {
595 list_append_ent((void *)mp, (void **)tmechs,
603 if (member_of_dups(tmechs_no_dups, mp))
608 list_append_ent((void *)mp, (void **)tmechs_no_dups,
676 mechanism_t *mp = *mpp;
677 if (mp->mechname &&
678 (!strcasecmp(mechname, mp->mechname))) {
679 *keylen = mp->keylen;
680 *algtype = mp->algtype;
684 if (mp->alias &&
685 (!strcasecmp(mechname, mp->alias))) {
686 *keylen = mp->keylen;
687 *algtype = mp->algtype;
722 mechanism_t *mp = *mpp;
725 if (mp->mechname &&
726 (strcasecmp(mechname, mp->mechname) == 0)) {
727 if (mp->alias) {
728 if ((len = strlen(mp->alias)) < bufsize) {
729 (void) strncpy(alias, mp->alias,
862 mechanism_t *mp = *mpp;
864 if (!VALID_MECH_ENTRY(mp) ||
865 AUTH_DES_COMPAT_CHK(mp))
868 if (keylen == mp->keylen &&
869 algtype == mp->algtype && mp->alias) {
870 int al_len = strlen(mp->alias);
873 (void) strncpy(alias, mp->alias,
955 mf_copy_ent(mfent_t *mp)
957 mfent_t *tp = calloc(1, sizeof (*mp));
959 if (!mp || !tp)
962 tp->mechname = mp->mechname ? strdup(mp->mechname) : NULL;
963 tp->oid = mp->oid ? strdup(mp->oid) : NULL;
964 tp->libname = mp->libname ? strdup(mp->libname) : NULL;
971 mf_free_ent(mfent_t *mp)
973 if (mp) {
974 if (mp->mechname)
975 free(mp->mechname);
976 if (mp->oid)
977 free(mp->oid);
978 if (mp->libname)
979 free(mp->libname);
980 free(mp);
1003 mfent_t *mp; /* a mech entry */
1028 while (mp = get_mechfile_ent(fptr)) {
1030 tmechs = (mfent_t **)list_append_ent((void *)mp,
1063 mfent_t *mp = *mpp;
1065 if (mp->mechname && strcasecmp(mechname, mp->mechname) == 0) {
1066 if (strlen(mp->libname) < len) {
1067 (void) strcpy(libname, mp->libname);