Lines Matching defs:princ
145 static void rxrpc_free_krb5_principal(struct krb5_principal *princ)
149 if (princ->name_parts) {
150 for (loop = princ->n_name_parts - 1; loop >= 0; loop--)
151 kfree(princ->name_parts[loop]);
152 kfree(princ->name_parts);
154 kfree(princ->realm);
192 static int rxrpc_krb5_decode_principal(struct krb5_principal *princ,
211 princ->n_name_parts = n_parts;
216 princ->name_parts = kcalloc(sizeof(char *), n_parts, GFP_KERNEL);
217 if (!princ->name_parts)
229 princ->name_parts[loop] = kmalloc(tmp + 1, GFP_KERNEL);
230 if (!princ->name_parts[loop])
232 memcpy(princ->name_parts[loop], xdr, tmp);
233 princ->name_parts[loop][tmp] = 0;
247 princ->realm = kmalloc(tmp + 1, GFP_KERNEL);
248 if (!princ->realm)
250 memcpy(princ->realm, xdr, tmp);
251 princ->realm[tmp] = 0;
256 _debug("%s/...@%s", princ->name_parts[0], princ->realm);
1004 const struct krb5_principal *princ;
1038 princ = &token->k5->client;
1039 toksize += 4 + princ->n_name_parts * 4;
1040 for (loop = 0; loop < princ->n_name_parts; loop++)
1041 toksize += RND(strlen(princ->name_parts[loop]));
1042 toksize += 4 + RND(strlen(princ->realm));
1044 princ = &token->k5->server;
1045 toksize += 4 + princ->n_name_parts * 4;
1046 for (loop = 0; loop < princ->n_name_parts; loop++)
1047 toksize += RND(strlen(princ->name_parts[loop]));
1048 toksize += 4 + RND(strlen(princ->realm));
1138 princ = &token->k5->client;
1139 ENCODE(princ->n_name_parts);
1140 for (loop = 0; loop < princ->n_name_parts; loop++)
1141 ENCODE_STR(princ->name_parts[loop]);
1142 ENCODE_STR(princ->realm);
1144 princ = &token->k5->server;
1145 ENCODE(princ->n_name_parts);
1146 for (loop = 0; loop < princ->n_name_parts; loop++)
1147 ENCODE_STR(princ->name_parts[loop]);
1148 ENCODE_STR(princ->realm);