Restructure Makefiles to accomodate multiple archs
[dragonfly.git] / crypto / heimdal-0.6.3 / lib / krb5 / krb5_build_principal.3
1 .\" Copyright (c) 1997, 2001 - 2002 Kungliga Tekniska Högskolan
2 .\" (Royal Institute of Technology, Stockholm, Sweden). 
3 .\" All rights reserved. 
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without 
6 .\" modification, are permitted provided that the following conditions 
7 .\" are met: 
8 .\"
9 .\" 1. Redistributions of source code must retain the above copyright 
10 .\"    notice, this list of conditions and the following disclaimer. 
11 .\"
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. 
15 .\"
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. 
19 .\"
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 
30 .\" SUCH DAMAGE. 
31 .\"
32 .\" $Id: krb5_build_principal.3,v 1.7 2003/04/16 13:58:14 lha Exp $
33 .\"
34 .Dd August 8, 1997
35 .Dt KRB5_BUILD_PRINCIPAL 3
36 .Os HEIMDAL
37 .Sh NAME
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
44 .Sh LIBRARY
45 Kerberos 5 Library (libkrb5, -lkrb5)
46 .Sh SYNOPSIS
47 .In krb5.h
48 .Ft krb5_error_code
49 .Fn krb5_build_principal "krb5_context context" "krb5_principal *principal" "int realm_len" "krb5_const_realm realm" "..."
50 .Ft krb5_error_code
51 .Fn krb5_build_principal_ext "krb5_context context" "krb5_principal *principal" "int realm_len" "krb5_const_realm realm" "..."
52 .Ft krb5_error_code
53 .Fn krb5_build_principal_va "krb5_context context" "krb5_principal *principal" "int realm_len" "krb5_const_realm realm" "va_list ap"
54 .Ft krb5_error_code
55 .Fn krb5_build_principal_va_ext "krb5_context context" "krb5_principal *principal" "int realm_len" "krb5_const_realm realm" "va_list ap"
56 .Ft krb5_error_code
57 .Fn krb5_make_principal "krb5_context context" "krb5_principal *principal" "krb5_const_realm realm" "..."
58 .Sh DESCRIPTION
59 These functions create a Kerberos 5 principal from a realm and a list
60 of components.
61 All of these functions return an allocated principal in the
62 .Fa principal
63 parameter, this should be freed with
64 .Fn krb5_free_principal
65 after use.
66 .Pp
67 The
68 .Dq build
69 functions take a
70 .Fa realm
71 and the length of the realm.  The
72 .Fn krb5_build_principal
73 and
74 .Fn krb5_build_principal_va
75 also takes a list of components (zero-terminated strings), terminated
76 with
77 .Dv NULL .
78 The
79 .Fn krb5_build_principal_ext
80 and
81 .Fn krb5_build_principal_va_ext
82 takes a list of length-value pairs, the list is terminated with a zero
83 length.
84 .Pp
85 The
86 .Fn krb5_make_principal
87 is a wrapper around
88 .Fn krb5_build_principal .
89 If the realm is
90 .Dv NULL ,
91 the default realm will be used.
92 .Sh BUGS
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.
96 .Sh SEE ALSO
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