1 .\" Copyright (c) 1997, 2001 - 2002 Kungliga Tekniska Högskolan
2 .\" (Royal Institute of Technology, Stockholm, Sweden).
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
16 .\" 3. Neither the name of the Institute nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" $Id: krb5_build_principal.3,v 1.7 2003/04/16 13:58:14 lha Exp $
35 .Dt KRB5_BUILD_PRINCIPAL 3
38 .Nm krb5_build_principal ,
39 .Nm krb5_build_principal_ext ,
40 .Nm krb5_build_principal_va ,
41 .Nm krb5_build_principal_va_ext ,
42 .Nm krb5_make_principal
43 .Nd principal creation functions
45 Kerberos 5 Library (libkrb5, -lkrb5)
49 .Fn krb5_build_principal "krb5_context context" "krb5_principal *principal" "int realm_len" "krb5_const_realm realm" "..."
51 .Fn krb5_build_principal_ext "krb5_context context" "krb5_principal *principal" "int realm_len" "krb5_const_realm realm" "..."
53 .Fn krb5_build_principal_va "krb5_context context" "krb5_principal *principal" "int realm_len" "krb5_const_realm realm" "va_list ap"
55 .Fn krb5_build_principal_va_ext "krb5_context context" "krb5_principal *principal" "int realm_len" "krb5_const_realm realm" "va_list ap"
57 .Fn krb5_make_principal "krb5_context context" "krb5_principal *principal" "krb5_const_realm realm" "..."
59 These functions create a Kerberos 5 principal from a realm and a list
61 All of these functions return an allocated principal in the
63 parameter, this should be freed with
64 .Fn krb5_free_principal
71 and the length of the realm. The
72 .Fn krb5_build_principal
74 .Fn krb5_build_principal_va
75 also takes a list of components (zero-terminated strings), terminated
79 .Fn krb5_build_principal_ext
81 .Fn krb5_build_principal_va_ext
82 takes a list of length-value pairs, the list is terminated with a zero
86 .Fn krb5_make_principal
88 .Fn krb5_build_principal .
91 the default realm will be used.
93 You can not have a NUL in a component. Until someone can give a good
94 example of where it would be a good idea to have NUL's in a component,
95 this will not be fixed.
97 .Xr krb5_425_conv_principal 3 ,
98 .Xr krb5_free_principal 3 ,
99 .Xr krb5_parse_name 3 ,
100 .Xr krb5_sname_to_principal 3 ,
101 .Xr krb5_unparse_name 3