HP Open Source Security for OpenVMS Volume 3: Kerberos > Chapter 6 KRB5 (Kerberos V5) Application Programming Interface

krb5_build_principal — Build a principal name

 » Table of Contents

 » Glossary

 » Index

C Prototype

krb5_error_code krb5_build_principal(
krb5_context context,
krb5_principal *principal,
int rlen,
const char *realm,
char *s1, ... )

Arguments

context (input/output) 

The context structure.

principal (output) 

Principal name.

rlen (input) 

Realm name length.

realm (input) 

Realm name.

... (input) 

A variable-length argument list. These arguments are added to the principal data.

Description

This routine and krb5_build_principal_va perform the same function. krb5_build_principal takes a variable-length argument list, which is added to the principal data being built.

Both functions take a realm name realm, realm name length rlen, and a list of null-terminated strings, and fill in a pointer to a principal structure principal, making it point to a structure representing the named principal. The last string must be followed in the argument list by a NULL pointer.

Return Values

This routine returns the following KRB5 status code:

0

Successful completion.

ENOMEM

Insufficient memory.