summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/lib/krb5/krb5_build_principal.3
blob: db703a42ddb62cc33abae1d25640632311a36277 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
.\" Copyright (c) 1997 Kungliga Tekniska Högskolan
.\" $Id: krb5_build_principal.3,v 1.2 2001/01/26 22:43:21 assar Exp $
.Dd August 8, 1997
.Dt KRB5_BUILD_PRINCIPAL 3
.Os HEIMDAL
.Sh NAME
.Nm krb5_build_principal ,
.Nm krb5_build_principal_ext ,
.Nm krb5_build_principal_va ,
.Nm krb5_build_principal_va_ext ,
.Nm krb5_make_principal
.Nd Principal creation functions
.Sh SYNOPSIS
.Fd #include <krb5.h>
.Ft krb5_error_code
.Fn krb5_build_principal "krb5_context context" "krb5_principal *principal" "int realm_len" "krb5_const_realm realm" "..."
.Ft krb5_error_code
.Fn krb5_build_principal_ext "krb5_context context" "krb5_principal *principal" "int realm_len" "krb5_const_realm realm" "..."
.Ft krb5_error_code
.Fn krb5_build_principal_va "krb5_context context" "krb5_principal *principal" "int realm_len" "krb5_const_realm realm" "va_list ap"
.Ft krb5_error_code
.Fn krb5_build_principal_va_ext "krb5_context context" "krb5_principal *principal" "int realm_len" "krb5_const_realm realm" "va_list ap"
.Ft krb5_error_code
.Fn krb5_make_principal "krb5_context context" "krb5_principal *principal" "krb5_const_realm realm" "..."
.Sh DESCRIPTION
These functions create a Kerberos 5 principal from a realm and a list
of components.
All of these functions return an allocated principal in the 
.Fa principal
parameter, this should be freed with
.Fn krb5_free_principal
after use.
.Pp
The
.Dq build
functions take a
.Fa realm
and the length of the realm.  The
.Fn krb5_build_principal 
and
.Fn krb5_build_principal_va
also takes a list of components (zero-terminated strings), terminated
with
.Dv NULL .
The
.Fn krb5_build_principal_ext 
and 
.Fn krb5_build_principal_va_ext 
takes a list of length-value pairs, the list is terminated with a zero
length.
.Pp
The 
.Fn krb5_make_principal
is a wrapper around 
.Fn krb5_build_principal .
If the realm is
.Dv NULL ,
the default realm will be used.
.Sh BUGS
You can not have a NUL in a component. Until someone can give a good
example of where it would be a good idea to have NUL's in a component,
this will not be fixed.
.Sh SEE ALSO
.Xr krb5_425_conv_principal 3 ,
.Xr krb5_free_principal 3 ,
.Xr krb5_parse_name 3 ,
.Xr krb5_sname_to_principal 3 ,
.Xr krb5_unparse_name 3
OpenPOWER on IntegriCloud