xref: /freebsd/crypto/heimdal/doc/doxyout/krb5/html/group__krb5__principal.html (revision 6a068746777241722b2b32c5d0bc443a2a64d80b)
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3<title>HeimdalKerberos5library: Heimdal Kerberos 5 principal functions</title>
4<link href="doxygen.css" rel="stylesheet" type="text/css">
5<link href="tabs.css" rel="stylesheet" type="text/css">
6</head><body>
7<p>
8<a href="http://www.h5l.org/"><img src="http://www.h5l.org/keyhole-heimdal.png" alt="keyhole logo"/></a>
9</p>
10<!-- end of header marker -->
11<!-- Generated by Doxygen 1.5.6 -->
12<div class="navigation" id="top">
13  <div class="tabs">
14    <ul>
15      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
16      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
17      <li><a href="modules.html"><span>Modules</span></a></li>
18      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
19    </ul>
20  </div>
21</div>
22<div class="contents">
23<h1>Heimdal Kerberos 5 principal functions</h1><table border="0" cellpadding="0" cellspacing="0">
24<tr><td></td></tr>
25<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
26<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION void <br>
27KRB5_LIB_CALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__principal.html#g5bd3f620ebe8cd4fe44b5c858ba17d22">krb5_free_principal</a> (krb5_context context, krb5_principal p)</td></tr>
28
29<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION void <br>
30KRB5_LIB_CALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__principal.html#g28b750b990452f02922bc74a6cac0313">krb5_principal_set_type</a> (krb5_context context, krb5_principal principal, int type)</td></tr>
31
32<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION int KRB5_LIB_CALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__principal.html#gf4a599c42592ff7485753e80b8de67b7">krb5_principal_get_type</a> (krb5_context context, krb5_const_principal principal)</td></tr>
33
34<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION const char <br>
35*KRB5_LIB_CALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__principal.html#gccd23426798cf776a96c23a455576362">krb5_principal_get_realm</a> (krb5_context context, krb5_const_principal principal)</td></tr>
36
37<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION unsigned int <br>
38KRB5_LIB_CALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__principal.html#g0138febd5414ace4835d3af78694833c">krb5_principal_get_num_comp</a> (krb5_context context, krb5_const_principal principal)</td></tr>
39
40<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
41krb5_error_code KRB5_LIB_CALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__principal.html#g1f1c6a19e7ccffb3284545ed3c12b827">krb5_parse_name_flags</a> (krb5_context context, const char *name, int flags, krb5_principal *principal)</td></tr>
42
43<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
44krb5_error_code KRB5_LIB_CALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__principal.html#gf0b0da913ab93d6e2577c0ccf4631f24">krb5_parse_name</a> (krb5_context context, const char *name, krb5_principal *principal)</td></tr>
45
46<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
47krb5_error_code KRB5_LIB_CALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__principal.html#g6f173badfb37ad41fdab6db77bde7689">krb5_unparse_name_fixed</a> (krb5_context context, krb5_const_principal principal, char *name, size_t len)</td></tr>
48
49<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
50krb5_error_code KRB5_LIB_CALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__principal.html#gcebe44e0685fc7b6c89a53eca71e7d24">krb5_unparse_name_fixed_short</a> (krb5_context context, krb5_const_principal principal, char *name, size_t len)</td></tr>
51
52<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
53krb5_error_code KRB5_LIB_CALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__principal.html#gd9ba42e18d79aa27458338967b66693f">krb5_unparse_name_fixed_flags</a> (krb5_context context, krb5_const_principal principal, int flags, char *name, size_t len)</td></tr>
54
55<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
56krb5_error_code KRB5_LIB_CALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__principal.html#gac881051ed59fe0dcd08cee62280b332">krb5_unparse_name</a> (krb5_context context, krb5_const_principal principal, char **name)</td></tr>
57
58<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
59krb5_error_code KRB5_LIB_CALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__principal.html#gd46122cd0e543b6c1219abb8730378e7">krb5_unparse_name_flags</a> (krb5_context context, krb5_const_principal principal, int flags, char **name)</td></tr>
60
61<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
62krb5_error_code KRB5_LIB_CALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__principal.html#g600247895edbde37e195c8b2089295a3">krb5_unparse_name_short</a> (krb5_context context, krb5_const_principal principal, char **name)</td></tr>
63
64<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
65krb5_error_code KRB5_LIB_CALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__principal.html#gaacf06babb00b391f35a8468a0ec96f9">krb5_principal_set_realm</a> (krb5_context context, krb5_principal principal, krb5_const_realm realm)</td></tr>
66
67<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
68krb5_error_code KRB5_LIB_CALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__principal.html#gb22638ec4ccdb648366653426708c1c5">krb5_build_principal</a> (krb5_context context, krb5_principal *principal, int rlen, krb5_const_realm realm,...)</td></tr>
69
70<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
71krb5_error_code KRB5_LIB_CALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__principal.html#ge744b61285c2ed08317e6c7cc433dd48">krb5_make_principal</a> (krb5_context context, krb5_principal *principal, krb5_const_realm realm,...)</td></tr>
72
73<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
74krb5_error_code KRB5_LIB_CALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__principal.html#gf8405ffca469a2fd936eb109cb3d9b16">krb5_copy_principal</a> (krb5_context context, krb5_const_principal inprinc, krb5_principal *outprinc)</td></tr>
75
76<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION krb5_boolean <br>
77KRB5_LIB_CALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__principal.html#g3c49cc0c1dac96d31a91aa263d8cdb4a">krb5_principal_compare_any_realm</a> (krb5_context context, krb5_const_principal princ1, krb5_const_principal princ2)</td></tr>
78
79<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION krb5_boolean <br>
80KRB5_LIB_CALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__principal.html#g13c84ce37f704c99353888eb03a19ea6">krb5_principal_compare</a> (krb5_context context, krb5_const_principal princ1, krb5_const_principal princ2)</td></tr>
81
82<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION krb5_boolean <br>
83KRB5_LIB_CALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__principal.html#g15abb49ce86457827a66f4ddfdd5b60c">krb5_realm_compare</a> (krb5_context context, krb5_const_principal princ1, krb5_const_principal princ2)</td></tr>
84
85<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION krb5_boolean <br>
86KRB5_LIB_CALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__principal.html#g6cf45d0f9cb4b0bf3b6ef574d9e5cc6a">krb5_principal_match</a> (krb5_context context, krb5_const_principal princ, krb5_const_principal pattern)</td></tr>
87
88<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
89krb5_error_code KRB5_LIB_CALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__principal.html#g8be0f5000da6ee0d4bd5dcaf3cb01d08">krb5_sname_to_principal</a> (krb5_context context, const char *hostname, const char *sname, int32_t type, krb5_principal *ret_princ)</td></tr>
90
91<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
92krb5_error_code KRB5_LIB_CALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__principal.html#gb044a3dca038ef4c61779cf1d0dc1e87">krb5_parse_nametype</a> (krb5_context context, const char *str, int32_t *nametype)</td></tr>
93
94<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION krb5_boolean <br>
95KRB5_LIB_CALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__principal.html#g9b24f6db481f24b86a93702eaa2755fc">krb5_principal_is_krbtgt</a> (krb5_context context, krb5_const_principal p)</td></tr>
96
97</table>
98<hr><a name="_details"></a><h2>Detailed Description</h2>
99<hr><h2>Function Documentation</h2>
100<a class="anchor" name="gb22638ec4ccdb648366653426708c1c5"></a><!-- doxytag: member="principal.c::krb5_build_principal" ref="gb22638ec4ccdb648366653426708c1c5" args="(krb5_context context, krb5_principal *principal, int rlen, krb5_const_realm realm,...)" -->
101<div class="memitem">
102<div class="memproto">
103      <table class="memname">
104        <tr>
105          <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_build_principal           </td>
106          <td>(</td>
107          <td class="paramtype">krb5_context&nbsp;</td>
108          <td class="paramname"> <em>context</em>, </td>
109        </tr>
110        <tr>
111          <td class="paramkey"></td>
112          <td></td>
113          <td class="paramtype">krb5_principal *&nbsp;</td>
114          <td class="paramname"> <em>principal</em>, </td>
115        </tr>
116        <tr>
117          <td class="paramkey"></td>
118          <td></td>
119          <td class="paramtype">int&nbsp;</td>
120          <td class="paramname"> <em>rlen</em>, </td>
121        </tr>
122        <tr>
123          <td class="paramkey"></td>
124          <td></td>
125          <td class="paramtype">krb5_const_realm&nbsp;</td>
126          <td class="paramname"> <em>realm</em>, </td>
127        </tr>
128        <tr>
129          <td class="paramkey"></td>
130          <td></td>
131          <td class="paramtype">&nbsp;</td>
132          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
133        </tr>
134        <tr>
135          <td></td>
136          <td>)</td>
137          <td></td><td></td><td></td>
138        </tr>
139      </table>
140</div>
141<div class="memdoc">
142
143<p>
144Build a principal using vararg style building<p>
145<dl compact><dt><b>Parameters:</b></dt><dd>
146  <table border="0" cellspacing="2" cellpadding="0">
147    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>A Kerberos context. </td></tr>
148    <tr><td valign="top"></td><td valign="top"><em>principal</em>&nbsp;</td><td>returned principal </td></tr>
149    <tr><td valign="top"></td><td valign="top"><em>rlen</em>&nbsp;</td><td>length of realm </td></tr>
150    <tr><td valign="top"></td><td valign="top"><em>realm</em>&nbsp;</td><td>realm name </td></tr>
151    <tr><td valign="top"></td><td valign="top"><em>...</em>&nbsp;</td><td>a list of components ended with NULL.</td></tr>
152  </table>
153</dl>
154<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl>
155
156</div>
157</div><p>
158<a class="anchor" name="gf8405ffca469a2fd936eb109cb3d9b16"></a><!-- doxytag: member="principal.c::krb5_copy_principal" ref="gf8405ffca469a2fd936eb109cb3d9b16" args="(krb5_context context, krb5_const_principal inprinc, krb5_principal *outprinc)" -->
159<div class="memitem">
160<div class="memproto">
161      <table class="memname">
162        <tr>
163          <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_principal           </td>
164          <td>(</td>
165          <td class="paramtype">krb5_context&nbsp;</td>
166          <td class="paramname"> <em>context</em>, </td>
167        </tr>
168        <tr>
169          <td class="paramkey"></td>
170          <td></td>
171          <td class="paramtype">krb5_const_principal&nbsp;</td>
172          <td class="paramname"> <em>inprinc</em>, </td>
173        </tr>
174        <tr>
175          <td class="paramkey"></td>
176          <td></td>
177          <td class="paramtype">krb5_principal *&nbsp;</td>
178          <td class="paramname"> <em>outprinc</em></td><td>&nbsp;</td>
179        </tr>
180        <tr>
181          <td></td>
182          <td>)</td>
183          <td></td><td></td><td></td>
184        </tr>
185      </table>
186</div>
187<div class="memdoc">
188
189<p>
190Copy a principal<p>
191<dl compact><dt><b>Parameters:</b></dt><dd>
192  <table border="0" cellspacing="2" cellpadding="0">
193    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>A Kerberos context. </td></tr>
194    <tr><td valign="top"></td><td valign="top"><em>inprinc</em>&nbsp;</td><td>principal to copy </td></tr>
195    <tr><td valign="top"></td><td valign="top"><em>outprinc</em>&nbsp;</td><td>copied principal, free with <a class="el" href="group__krb5__principal.html#g5bd3f620ebe8cd4fe44b5c858ba17d22">krb5_free_principal()</a></td></tr>
196  </table>
197</dl>
198<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl>
199
200</div>
201</div><p>
202<a class="anchor" name="g5bd3f620ebe8cd4fe44b5c858ba17d22"></a><!-- doxytag: member="principal.c::krb5_free_principal" ref="g5bd3f620ebe8cd4fe44b5c858ba17d22" args="(krb5_context context, krb5_principal p)" -->
203<div class="memitem">
204<div class="memproto">
205      <table class="memname">
206        <tr>
207          <td class="memname">KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_principal           </td>
208          <td>(</td>
209          <td class="paramtype">krb5_context&nbsp;</td>
210          <td class="paramname"> <em>context</em>, </td>
211        </tr>
212        <tr>
213          <td class="paramkey"></td>
214          <td></td>
215          <td class="paramtype">krb5_principal&nbsp;</td>
216          <td class="paramname"> <em>p</em></td><td>&nbsp;</td>
217        </tr>
218        <tr>
219          <td></td>
220          <td>)</td>
221          <td></td><td></td><td></td>
222        </tr>
223      </table>
224</div>
225<div class="memdoc">
226
227<p>
228Frees a Kerberos principal allocated by the library with <a class="el" href="group__krb5__principal.html#gf0b0da913ab93d6e2577c0ccf4631f24">krb5_parse_name()</a>, <a class="el" href="group__krb5__principal.html#ge744b61285c2ed08317e6c7cc433dd48">krb5_make_principal()</a> or any other related principal functions.<p>
229<dl compact><dt><b>Parameters:</b></dt><dd>
230  <table border="0" cellspacing="2" cellpadding="0">
231    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>A Kerberos context. </td></tr>
232    <tr><td valign="top"></td><td valign="top"><em>p</em>&nbsp;</td><td>a principal to free.</td></tr>
233  </table>
234</dl>
235<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl>
236
237</div>
238</div><p>
239<a class="anchor" name="ge744b61285c2ed08317e6c7cc433dd48"></a><!-- doxytag: member="principal.c::krb5_make_principal" ref="ge744b61285c2ed08317e6c7cc433dd48" args="(krb5_context context, krb5_principal *principal, krb5_const_realm realm,...)" -->
240<div class="memitem">
241<div class="memproto">
242      <table class="memname">
243        <tr>
244          <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_make_principal           </td>
245          <td>(</td>
246          <td class="paramtype">krb5_context&nbsp;</td>
247          <td class="paramname"> <em>context</em>, </td>
248        </tr>
249        <tr>
250          <td class="paramkey"></td>
251          <td></td>
252          <td class="paramtype">krb5_principal *&nbsp;</td>
253          <td class="paramname"> <em>principal</em>, </td>
254        </tr>
255        <tr>
256          <td class="paramkey"></td>
257          <td></td>
258          <td class="paramtype">krb5_const_realm&nbsp;</td>
259          <td class="paramname"> <em>realm</em>, </td>
260        </tr>
261        <tr>
262          <td class="paramkey"></td>
263          <td></td>
264          <td class="paramtype">&nbsp;</td>
265          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
266        </tr>
267        <tr>
268          <td></td>
269          <td>)</td>
270          <td></td><td></td><td></td>
271        </tr>
272      </table>
273</div>
274<div class="memdoc">
275
276<p>
277Build a principal using vararg style building<p>
278<dl compact><dt><b>Parameters:</b></dt><dd>
279  <table border="0" cellspacing="2" cellpadding="0">
280    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>A Kerberos context. </td></tr>
281    <tr><td valign="top"></td><td valign="top"><em>principal</em>&nbsp;</td><td>returned principal </td></tr>
282    <tr><td valign="top"></td><td valign="top"><em>realm</em>&nbsp;</td><td>realm name </td></tr>
283    <tr><td valign="top"></td><td valign="top"><em>...</em>&nbsp;</td><td>a list of components ended with NULL.</td></tr>
284  </table>
285</dl>
286<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl>
287
288</div>
289</div><p>
290<a class="anchor" name="gf0b0da913ab93d6e2577c0ccf4631f24"></a><!-- doxytag: member="principal.c::krb5_parse_name" ref="gf0b0da913ab93d6e2577c0ccf4631f24" args="(krb5_context context, const char *name, krb5_principal *principal)" -->
291<div class="memitem">
292<div class="memproto">
293      <table class="memname">
294        <tr>
295          <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_parse_name           </td>
296          <td>(</td>
297          <td class="paramtype">krb5_context&nbsp;</td>
298          <td class="paramname"> <em>context</em>, </td>
299        </tr>
300        <tr>
301          <td class="paramkey"></td>
302          <td></td>
303          <td class="paramtype">const char *&nbsp;</td>
304          <td class="paramname"> <em>name</em>, </td>
305        </tr>
306        <tr>
307          <td class="paramkey"></td>
308          <td></td>
309          <td class="paramtype">krb5_principal *&nbsp;</td>
310          <td class="paramname"> <em>principal</em></td><td>&nbsp;</td>
311        </tr>
312        <tr>
313          <td></td>
314          <td>)</td>
315          <td></td><td></td><td></td>
316        </tr>
317      </table>
318</div>
319<div class="memdoc">
320
321<p>
322Parse a name into a krb5_principal structure<p>
323<dl compact><dt><b>Parameters:</b></dt><dd>
324  <table border="0" cellspacing="2" cellpadding="0">
325    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>Kerberos 5 context </td></tr>
326    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>name to parse into a Kerberos principal </td></tr>
327    <tr><td valign="top"></td><td valign="top"><em>principal</em>&nbsp;</td><td>returned principal, free with <a class="el" href="group__krb5__principal.html#g5bd3f620ebe8cd4fe44b5c858ba17d22">krb5_free_principal()</a>.</td></tr>
328  </table>
329</dl>
330<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl>
331
332</div>
333</div><p>
334<a class="anchor" name="g1f1c6a19e7ccffb3284545ed3c12b827"></a><!-- doxytag: member="principal.c::krb5_parse_name_flags" ref="g1f1c6a19e7ccffb3284545ed3c12b827" args="(krb5_context context, const char *name, int flags, krb5_principal *principal)" -->
335<div class="memitem">
336<div class="memproto">
337      <table class="memname">
338        <tr>
339          <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_parse_name_flags           </td>
340          <td>(</td>
341          <td class="paramtype">krb5_context&nbsp;</td>
342          <td class="paramname"> <em>context</em>, </td>
343        </tr>
344        <tr>
345          <td class="paramkey"></td>
346          <td></td>
347          <td class="paramtype">const char *&nbsp;</td>
348          <td class="paramname"> <em>name</em>, </td>
349        </tr>
350        <tr>
351          <td class="paramkey"></td>
352          <td></td>
353          <td class="paramtype">int&nbsp;</td>
354          <td class="paramname"> <em>flags</em>, </td>
355        </tr>
356        <tr>
357          <td class="paramkey"></td>
358          <td></td>
359          <td class="paramtype">krb5_principal *&nbsp;</td>
360          <td class="paramname"> <em>principal</em></td><td>&nbsp;</td>
361        </tr>
362        <tr>
363          <td></td>
364          <td>)</td>
365          <td></td><td></td><td></td>
366        </tr>
367      </table>
368</div>
369<div class="memdoc">
370
371<p>
372Parse a name into a krb5_principal structure, flags controls the behavior.<p>
373<dl compact><dt><b>Parameters:</b></dt><dd>
374  <table border="0" cellspacing="2" cellpadding="0">
375    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>Kerberos 5 context </td></tr>
376    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>name to parse into a Kerberos principal </td></tr>
377    <tr><td valign="top"></td><td valign="top"><em>flags</em>&nbsp;</td><td>flags to control the behavior </td></tr>
378    <tr><td valign="top"></td><td valign="top"><em>principal</em>&nbsp;</td><td>returned principal, free with <a class="el" href="group__krb5__principal.html#g5bd3f620ebe8cd4fe44b5c858ba17d22">krb5_free_principal()</a>.</td></tr>
379  </table>
380</dl>
381<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl>
382
383</div>
384</div><p>
385<a class="anchor" name="gb044a3dca038ef4c61779cf1d0dc1e87"></a><!-- doxytag: member="principal.c::krb5_parse_nametype" ref="gb044a3dca038ef4c61779cf1d0dc1e87" args="(krb5_context context, const char *str, int32_t *nametype)" -->
386<div class="memitem">
387<div class="memproto">
388      <table class="memname">
389        <tr>
390          <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_parse_nametype           </td>
391          <td>(</td>
392          <td class="paramtype">krb5_context&nbsp;</td>
393          <td class="paramname"> <em>context</em>, </td>
394        </tr>
395        <tr>
396          <td class="paramkey"></td>
397          <td></td>
398          <td class="paramtype">const char *&nbsp;</td>
399          <td class="paramname"> <em>str</em>, </td>
400        </tr>
401        <tr>
402          <td class="paramkey"></td>
403          <td></td>
404          <td class="paramtype">int32_t *&nbsp;</td>
405          <td class="paramname"> <em>nametype</em></td><td>&nbsp;</td>
406        </tr>
407        <tr>
408          <td></td>
409          <td>)</td>
410          <td></td><td></td><td></td>
411        </tr>
412      </table>
413</div>
414<div class="memdoc">
415
416<p>
417Parse nametype string and return a nametype integer
418</div>
419</div><p>
420<a class="anchor" name="g13c84ce37f704c99353888eb03a19ea6"></a><!-- doxytag: member="principal.c::krb5_principal_compare" ref="g13c84ce37f704c99353888eb03a19ea6" args="(krb5_context context, krb5_const_principal princ1, krb5_const_principal princ2)" -->
421<div class="memitem">
422<div class="memproto">
423      <table class="memname">
424        <tr>
425          <td class="memname">KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_principal_compare           </td>
426          <td>(</td>
427          <td class="paramtype">krb5_context&nbsp;</td>
428          <td class="paramname"> <em>context</em>, </td>
429        </tr>
430        <tr>
431          <td class="paramkey"></td>
432          <td></td>
433          <td class="paramtype">krb5_const_principal&nbsp;</td>
434          <td class="paramname"> <em>princ1</em>, </td>
435        </tr>
436        <tr>
437          <td class="paramkey"></td>
438          <td></td>
439          <td class="paramtype">krb5_const_principal&nbsp;</td>
440          <td class="paramname"> <em>princ2</em></td><td>&nbsp;</td>
441        </tr>
442        <tr>
443          <td></td>
444          <td>)</td>
445          <td></td><td></td><td></td>
446        </tr>
447      </table>
448</div>
449<div class="memdoc">
450
451<p>
452Compares the two principals, including realm of the principals and returns TRUE if they are the same and FALSE if not.<p>
453<dl compact><dt><b>Parameters:</b></dt><dd>
454  <table border="0" cellspacing="2" cellpadding="0">
455    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>Kerberos 5 context </td></tr>
456    <tr><td valign="top"></td><td valign="top"><em>princ1</em>&nbsp;</td><td>first principal to compare </td></tr>
457    <tr><td valign="top"></td><td valign="top"><em>princ2</em>&nbsp;</td><td>second principal to compare</td></tr>
458  </table>
459</dl>
460<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__krb5__principal.html#g3c49cc0c1dac96d31a91aa263d8cdb4a">krb5_principal_compare_any_realm()</a> <p>
461<a class="el" href="group__krb5__principal.html#g15abb49ce86457827a66f4ddfdd5b60c">krb5_realm_compare()</a> </dd></dl>
462
463</div>
464</div><p>
465<a class="anchor" name="g3c49cc0c1dac96d31a91aa263d8cdb4a"></a><!-- doxytag: member="principal.c::krb5_principal_compare_any_realm" ref="g3c49cc0c1dac96d31a91aa263d8cdb4a" args="(krb5_context context, krb5_const_principal princ1, krb5_const_principal princ2)" -->
466<div class="memitem">
467<div class="memproto">
468      <table class="memname">
469        <tr>
470          <td class="memname">KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_principal_compare_any_realm           </td>
471          <td>(</td>
472          <td class="paramtype">krb5_context&nbsp;</td>
473          <td class="paramname"> <em>context</em>, </td>
474        </tr>
475        <tr>
476          <td class="paramkey"></td>
477          <td></td>
478          <td class="paramtype">krb5_const_principal&nbsp;</td>
479          <td class="paramname"> <em>princ1</em>, </td>
480        </tr>
481        <tr>
482          <td class="paramkey"></td>
483          <td></td>
484          <td class="paramtype">krb5_const_principal&nbsp;</td>
485          <td class="paramname"> <em>princ2</em></td><td>&nbsp;</td>
486        </tr>
487        <tr>
488          <td></td>
489          <td>)</td>
490          <td></td><td></td><td></td>
491        </tr>
492      </table>
493</div>
494<div class="memdoc">
495
496<p>
497Return TRUE iff princ1 == princ2 (without considering the realm)<p>
498<dl compact><dt><b>Parameters:</b></dt><dd>
499  <table border="0" cellspacing="2" cellpadding="0">
500    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>Kerberos 5 context </td></tr>
501    <tr><td valign="top"></td><td valign="top"><em>princ1</em>&nbsp;</td><td>first principal to compare </td></tr>
502    <tr><td valign="top"></td><td valign="top"><em>princ2</em>&nbsp;</td><td>second principal to compare</td></tr>
503  </table>
504</dl>
505<dl class="return" compact><dt><b>Returns:</b></dt><dd>non zero if equal, 0 if not</dd></dl>
506<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__krb5__principal.html#g13c84ce37f704c99353888eb03a19ea6">krb5_principal_compare()</a> <p>
507<a class="el" href="group__krb5__principal.html#g15abb49ce86457827a66f4ddfdd5b60c">krb5_realm_compare()</a> </dd></dl>
508
509</div>
510</div><p>
511<a class="anchor" name="g0138febd5414ace4835d3af78694833c"></a><!-- doxytag: member="principal.c::krb5_principal_get_num_comp" ref="g0138febd5414ace4835d3af78694833c" args="(krb5_context context, krb5_const_principal principal)" -->
512<div class="memitem">
513<div class="memproto">
514      <table class="memname">
515        <tr>
516          <td class="memname">KRB5_LIB_FUNCTION unsigned int KRB5_LIB_CALL krb5_principal_get_num_comp           </td>
517          <td>(</td>
518          <td class="paramtype">krb5_context&nbsp;</td>
519          <td class="paramname"> <em>context</em>, </td>
520        </tr>
521        <tr>
522          <td class="paramkey"></td>
523          <td></td>
524          <td class="paramtype">krb5_const_principal&nbsp;</td>
525          <td class="paramname"> <em>principal</em></td><td>&nbsp;</td>
526        </tr>
527        <tr>
528          <td></td>
529          <td>)</td>
530          <td></td><td></td><td></td>
531        </tr>
532      </table>
533</div>
534<div class="memdoc">
535
536<p>
537Get number of component is principal.<p>
538<dl compact><dt><b>Parameters:</b></dt><dd>
539  <table border="0" cellspacing="2" cellpadding="0">
540    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>Kerberos 5 context </td></tr>
541    <tr><td valign="top"></td><td valign="top"><em>principal</em>&nbsp;</td><td>principal to query</td></tr>
542  </table>
543</dl>
544<dl class="return" compact><dt><b>Returns:</b></dt><dd>number of components in string </dd></dl>
545
546</div>
547</div><p>
548<a class="anchor" name="gccd23426798cf776a96c23a455576362"></a><!-- doxytag: member="principal.c::krb5_principal_get_realm" ref="gccd23426798cf776a96c23a455576362" args="(krb5_context context, krb5_const_principal principal)" -->
549<div class="memitem">
550<div class="memproto">
551      <table class="memname">
552        <tr>
553          <td class="memname">KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL krb5_principal_get_realm           </td>
554          <td>(</td>
555          <td class="paramtype">krb5_context&nbsp;</td>
556          <td class="paramname"> <em>context</em>, </td>
557        </tr>
558        <tr>
559          <td class="paramkey"></td>
560          <td></td>
561          <td class="paramtype">krb5_const_principal&nbsp;</td>
562          <td class="paramname"> <em>principal</em></td><td>&nbsp;</td>
563        </tr>
564        <tr>
565          <td></td>
566          <td>)</td>
567          <td></td><td></td><td></td>
568        </tr>
569      </table>
570</div>
571<div class="memdoc">
572
573<p>
574Get the realm of the principal<p>
575<dl compact><dt><b>Parameters:</b></dt><dd>
576  <table border="0" cellspacing="2" cellpadding="0">
577    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>A Kerberos context. </td></tr>
578    <tr><td valign="top"></td><td valign="top"><em>principal</em>&nbsp;</td><td>principal to get the realm for</td></tr>
579  </table>
580</dl>
581<dl class="return" compact><dt><b>Returns:</b></dt><dd>realm of the principal, don't free or use after krb5_principal is freed </dd></dl>
582
583</div>
584</div><p>
585<a class="anchor" name="gf4a599c42592ff7485753e80b8de67b7"></a><!-- doxytag: member="principal.c::krb5_principal_get_type" ref="gf4a599c42592ff7485753e80b8de67b7" args="(krb5_context context, krb5_const_principal principal)" -->
586<div class="memitem">
587<div class="memproto">
588      <table class="memname">
589        <tr>
590          <td class="memname">KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_principal_get_type           </td>
591          <td>(</td>
592          <td class="paramtype">krb5_context&nbsp;</td>
593          <td class="paramname"> <em>context</em>, </td>
594        </tr>
595        <tr>
596          <td class="paramkey"></td>
597          <td></td>
598          <td class="paramtype">krb5_const_principal&nbsp;</td>
599          <td class="paramname"> <em>principal</em></td><td>&nbsp;</td>
600        </tr>
601        <tr>
602          <td></td>
603          <td>)</td>
604          <td></td><td></td><td></td>
605        </tr>
606      </table>
607</div>
608<div class="memdoc">
609
610<p>
611Get the type of the principal<p>
612<dl compact><dt><b>Parameters:</b></dt><dd>
613  <table border="0" cellspacing="2" cellpadding="0">
614    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>A Kerberos context. </td></tr>
615    <tr><td valign="top"></td><td valign="top"><em>principal</em>&nbsp;</td><td>principal to get the type for</td></tr>
616  </table>
617</dl>
618<dl class="return" compact><dt><b>Returns:</b></dt><dd>the type of principal </dd></dl>
619
620</div>
621</div><p>
622<a class="anchor" name="g9b24f6db481f24b86a93702eaa2755fc"></a><!-- doxytag: member="principal.c::krb5_principal_is_krbtgt" ref="g9b24f6db481f24b86a93702eaa2755fc" args="(krb5_context context, krb5_const_principal p)" -->
623<div class="memitem">
624<div class="memproto">
625      <table class="memname">
626        <tr>
627          <td class="memname">KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_principal_is_krbtgt           </td>
628          <td>(</td>
629          <td class="paramtype">krb5_context&nbsp;</td>
630          <td class="paramname"> <em>context</em>, </td>
631        </tr>
632        <tr>
633          <td class="paramkey"></td>
634          <td></td>
635          <td class="paramtype">krb5_const_principal&nbsp;</td>
636          <td class="paramname"> <em>p</em></td><td>&nbsp;</td>
637        </tr>
638        <tr>
639          <td></td>
640          <td>)</td>
641          <td></td><td></td><td></td>
642        </tr>
643      </table>
644</div>
645<div class="memdoc">
646
647<p>
648Check if the cname part of the principal is a krbtgt principal
649</div>
650</div><p>
651<a class="anchor" name="g6cf45d0f9cb4b0bf3b6ef574d9e5cc6a"></a><!-- doxytag: member="principal.c::krb5_principal_match" ref="g6cf45d0f9cb4b0bf3b6ef574d9e5cc6a" args="(krb5_context context, krb5_const_principal princ, krb5_const_principal pattern)" -->
652<div class="memitem">
653<div class="memproto">
654      <table class="memname">
655        <tr>
656          <td class="memname">KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_principal_match           </td>
657          <td>(</td>
658          <td class="paramtype">krb5_context&nbsp;</td>
659          <td class="paramname"> <em>context</em>, </td>
660        </tr>
661        <tr>
662          <td class="paramkey"></td>
663          <td></td>
664          <td class="paramtype">krb5_const_principal&nbsp;</td>
665          <td class="paramname"> <em>princ</em>, </td>
666        </tr>
667        <tr>
668          <td class="paramkey"></td>
669          <td></td>
670          <td class="paramtype">krb5_const_principal&nbsp;</td>
671          <td class="paramname"> <em>pattern</em></td><td>&nbsp;</td>
672        </tr>
673        <tr>
674          <td></td>
675          <td>)</td>
676          <td></td><td></td><td></td>
677        </tr>
678      </table>
679</div>
680<div class="memdoc">
681
682<p>
683return TRUE iff princ matches pattern
684</div>
685</div><p>
686<a class="anchor" name="gaacf06babb00b391f35a8468a0ec96f9"></a><!-- doxytag: member="principal.c::krb5_principal_set_realm" ref="gaacf06babb00b391f35a8468a0ec96f9" args="(krb5_context context, krb5_principal principal, krb5_const_realm realm)" -->
687<div class="memitem">
688<div class="memproto">
689      <table class="memname">
690        <tr>
691          <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_principal_set_realm           </td>
692          <td>(</td>
693          <td class="paramtype">krb5_context&nbsp;</td>
694          <td class="paramname"> <em>context</em>, </td>
695        </tr>
696        <tr>
697          <td class="paramkey"></td>
698          <td></td>
699          <td class="paramtype">krb5_principal&nbsp;</td>
700          <td class="paramname"> <em>principal</em>, </td>
701        </tr>
702        <tr>
703          <td class="paramkey"></td>
704          <td></td>
705          <td class="paramtype">krb5_const_realm&nbsp;</td>
706          <td class="paramname"> <em>realm</em></td><td>&nbsp;</td>
707        </tr>
708        <tr>
709          <td></td>
710          <td>)</td>
711          <td></td><td></td><td></td>
712        </tr>
713      </table>
714</div>
715<div class="memdoc">
716
717<p>
718Set a new realm for a principal, and as a side-effect free the previous realm.<p>
719<dl compact><dt><b>Parameters:</b></dt><dd>
720  <table border="0" cellspacing="2" cellpadding="0">
721    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>A Kerberos context. </td></tr>
722    <tr><td valign="top"></td><td valign="top"><em>principal</em>&nbsp;</td><td>principal set the realm for </td></tr>
723    <tr><td valign="top"></td><td valign="top"><em>realm</em>&nbsp;</td><td>the new realm to set</td></tr>
724  </table>
725</dl>
726<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl>
727
728</div>
729</div><p>
730<a class="anchor" name="g28b750b990452f02922bc74a6cac0313"></a><!-- doxytag: member="principal.c::krb5_principal_set_type" ref="g28b750b990452f02922bc74a6cac0313" args="(krb5_context context, krb5_principal principal, int type)" -->
731<div class="memitem">
732<div class="memproto">
733      <table class="memname">
734        <tr>
735          <td class="memname">KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_principal_set_type           </td>
736          <td>(</td>
737          <td class="paramtype">krb5_context&nbsp;</td>
738          <td class="paramname"> <em>context</em>, </td>
739        </tr>
740        <tr>
741          <td class="paramkey"></td>
742          <td></td>
743          <td class="paramtype">krb5_principal&nbsp;</td>
744          <td class="paramname"> <em>principal</em>, </td>
745        </tr>
746        <tr>
747          <td class="paramkey"></td>
748          <td></td>
749          <td class="paramtype">int&nbsp;</td>
750          <td class="paramname"> <em>type</em></td><td>&nbsp;</td>
751        </tr>
752        <tr>
753          <td></td>
754          <td>)</td>
755          <td></td><td></td><td></td>
756        </tr>
757      </table>
758</div>
759<div class="memdoc">
760
761<p>
762Set the type of the principal<p>
763<dl compact><dt><b>Parameters:</b></dt><dd>
764  <table border="0" cellspacing="2" cellpadding="0">
765    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>A Kerberos context. </td></tr>
766    <tr><td valign="top"></td><td valign="top"><em>principal</em>&nbsp;</td><td>principal to set the type for </td></tr>
767    <tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>the new type</td></tr>
768  </table>
769</dl>
770<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl>
771
772</div>
773</div><p>
774<a class="anchor" name="g15abb49ce86457827a66f4ddfdd5b60c"></a><!-- doxytag: member="principal.c::krb5_realm_compare" ref="g15abb49ce86457827a66f4ddfdd5b60c" args="(krb5_context context, krb5_const_principal princ1, krb5_const_principal princ2)" -->
775<div class="memitem">
776<div class="memproto">
777      <table class="memname">
778        <tr>
779          <td class="memname">KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_realm_compare           </td>
780          <td>(</td>
781          <td class="paramtype">krb5_context&nbsp;</td>
782          <td class="paramname"> <em>context</em>, </td>
783        </tr>
784        <tr>
785          <td class="paramkey"></td>
786          <td></td>
787          <td class="paramtype">krb5_const_principal&nbsp;</td>
788          <td class="paramname"> <em>princ1</em>, </td>
789        </tr>
790        <tr>
791          <td class="paramkey"></td>
792          <td></td>
793          <td class="paramtype">krb5_const_principal&nbsp;</td>
794          <td class="paramname"> <em>princ2</em></td><td>&nbsp;</td>
795        </tr>
796        <tr>
797          <td></td>
798          <td>)</td>
799          <td></td><td></td><td></td>
800        </tr>
801      </table>
802</div>
803<div class="memdoc">
804
805<p>
806return TRUE iff realm(princ1) == realm(princ2)<p>
807<dl compact><dt><b>Parameters:</b></dt><dd>
808  <table border="0" cellspacing="2" cellpadding="0">
809    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>Kerberos 5 context </td></tr>
810    <tr><td valign="top"></td><td valign="top"><em>princ1</em>&nbsp;</td><td>first principal to compare </td></tr>
811    <tr><td valign="top"></td><td valign="top"><em>princ2</em>&nbsp;</td><td>second principal to compare</td></tr>
812  </table>
813</dl>
814<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__krb5__principal.html#g3c49cc0c1dac96d31a91aa263d8cdb4a">krb5_principal_compare_any_realm()</a> <p>
815<a class="el" href="group__krb5__principal.html#g13c84ce37f704c99353888eb03a19ea6">krb5_principal_compare()</a> </dd></dl>
816
817</div>
818</div><p>
819<a class="anchor" name="g8be0f5000da6ee0d4bd5dcaf3cb01d08"></a><!-- doxytag: member="principal.c::krb5_sname_to_principal" ref="g8be0f5000da6ee0d4bd5dcaf3cb01d08" args="(krb5_context context, const char *hostname, const char *sname, int32_t type, krb5_principal *ret_princ)" -->
820<div class="memitem">
821<div class="memproto">
822      <table class="memname">
823        <tr>
824          <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_sname_to_principal           </td>
825          <td>(</td>
826          <td class="paramtype">krb5_context&nbsp;</td>
827          <td class="paramname"> <em>context</em>, </td>
828        </tr>
829        <tr>
830          <td class="paramkey"></td>
831          <td></td>
832          <td class="paramtype">const char *&nbsp;</td>
833          <td class="paramname"> <em>hostname</em>, </td>
834        </tr>
835        <tr>
836          <td class="paramkey"></td>
837          <td></td>
838          <td class="paramtype">const char *&nbsp;</td>
839          <td class="paramname"> <em>sname</em>, </td>
840        </tr>
841        <tr>
842          <td class="paramkey"></td>
843          <td></td>
844          <td class="paramtype">int32_t&nbsp;</td>
845          <td class="paramname"> <em>type</em>, </td>
846        </tr>
847        <tr>
848          <td class="paramkey"></td>
849          <td></td>
850          <td class="paramtype">krb5_principal *&nbsp;</td>
851          <td class="paramname"> <em>ret_princ</em></td><td>&nbsp;</td>
852        </tr>
853        <tr>
854          <td></td>
855          <td>)</td>
856          <td></td><td></td><td></td>
857        </tr>
858      </table>
859</div>
860<div class="memdoc">
861
862<p>
863Create a principal for the service running on hostname. If KRB5_NT_SRV_HST is used, the hostname is canonization using DNS (or some other service), this is potentially insecure.<p>
864<dl compact><dt><b>Parameters:</b></dt><dd>
865  <table border="0" cellspacing="2" cellpadding="0">
866    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>A Kerberos context. </td></tr>
867    <tr><td valign="top"></td><td valign="top"><em>hostname</em>&nbsp;</td><td>hostname to use </td></tr>
868    <tr><td valign="top"></td><td valign="top"><em>sname</em>&nbsp;</td><td>Service name to use </td></tr>
869    <tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>name type of pricipal, use KRB5_NT_SRV_HST or KRB5_NT_UNKNOWN. </td></tr>
870    <tr><td valign="top"></td><td valign="top"><em>ret_princ</em>&nbsp;</td><td>return principal, free with <a class="el" href="group__krb5__principal.html#g5bd3f620ebe8cd4fe44b5c858ba17d22">krb5_free_principal()</a>.</td></tr>
871  </table>
872</dl>
873<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl>
874
875</div>
876</div><p>
877<a class="anchor" name="gac881051ed59fe0dcd08cee62280b332"></a><!-- doxytag: member="principal.c::krb5_unparse_name" ref="gac881051ed59fe0dcd08cee62280b332" args="(krb5_context context, krb5_const_principal principal, char **name)" -->
878<div class="memitem">
879<div class="memproto">
880      <table class="memname">
881        <tr>
882          <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_unparse_name           </td>
883          <td>(</td>
884          <td class="paramtype">krb5_context&nbsp;</td>
885          <td class="paramname"> <em>context</em>, </td>
886        </tr>
887        <tr>
888          <td class="paramkey"></td>
889          <td></td>
890          <td class="paramtype">krb5_const_principal&nbsp;</td>
891          <td class="paramname"> <em>principal</em>, </td>
892        </tr>
893        <tr>
894          <td class="paramkey"></td>
895          <td></td>
896          <td class="paramtype">char **&nbsp;</td>
897          <td class="paramname"> <em>name</em></td><td>&nbsp;</td>
898        </tr>
899        <tr>
900          <td></td>
901          <td>)</td>
902          <td></td><td></td><td></td>
903        </tr>
904      </table>
905</div>
906<div class="memdoc">
907
908<p>
909Unparse the Kerberos name into a string<p>
910<dl compact><dt><b>Parameters:</b></dt><dd>
911  <table border="0" cellspacing="2" cellpadding="0">
912    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>Kerberos 5 context </td></tr>
913    <tr><td valign="top"></td><td valign="top"><em>principal</em>&nbsp;</td><td>principal to query </td></tr>
914    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>resulting string, free with krb5_xfree()</td></tr>
915  </table>
916</dl>
917<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl>
918
919</div>
920</div><p>
921<a class="anchor" name="g6f173badfb37ad41fdab6db77bde7689"></a><!-- doxytag: member="principal.c::krb5_unparse_name_fixed" ref="g6f173badfb37ad41fdab6db77bde7689" args="(krb5_context context, krb5_const_principal principal, char *name, size_t len)" -->
922<div class="memitem">
923<div class="memproto">
924      <table class="memname">
925        <tr>
926          <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_unparse_name_fixed           </td>
927          <td>(</td>
928          <td class="paramtype">krb5_context&nbsp;</td>
929          <td class="paramname"> <em>context</em>, </td>
930        </tr>
931        <tr>
932          <td class="paramkey"></td>
933          <td></td>
934          <td class="paramtype">krb5_const_principal&nbsp;</td>
935          <td class="paramname"> <em>principal</em>, </td>
936        </tr>
937        <tr>
938          <td class="paramkey"></td>
939          <td></td>
940          <td class="paramtype">char *&nbsp;</td>
941          <td class="paramname"> <em>name</em>, </td>
942        </tr>
943        <tr>
944          <td class="paramkey"></td>
945          <td></td>
946          <td class="paramtype">size_t&nbsp;</td>
947          <td class="paramname"> <em>len</em></td><td>&nbsp;</td>
948        </tr>
949        <tr>
950          <td></td>
951          <td>)</td>
952          <td></td><td></td><td></td>
953        </tr>
954      </table>
955</div>
956<div class="memdoc">
957
958<p>
959Unparse the principal name to a fixed buffer<p>
960<dl compact><dt><b>Parameters:</b></dt><dd>
961  <table border="0" cellspacing="2" cellpadding="0">
962    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>A Kerberos context. </td></tr>
963    <tr><td valign="top"></td><td valign="top"><em>principal</em>&nbsp;</td><td>principal to unparse </td></tr>
964    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>buffer to write name to </td></tr>
965    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>length of buffer</td></tr>
966  </table>
967</dl>
968<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl>
969
970</div>
971</div><p>
972<a class="anchor" name="gd9ba42e18d79aa27458338967b66693f"></a><!-- doxytag: member="principal.c::krb5_unparse_name_fixed_flags" ref="gd9ba42e18d79aa27458338967b66693f" args="(krb5_context context, krb5_const_principal principal, int flags, char *name, size_t len)" -->
973<div class="memitem">
974<div class="memproto">
975      <table class="memname">
976        <tr>
977          <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_unparse_name_fixed_flags           </td>
978          <td>(</td>
979          <td class="paramtype">krb5_context&nbsp;</td>
980          <td class="paramname"> <em>context</em>, </td>
981        </tr>
982        <tr>
983          <td class="paramkey"></td>
984          <td></td>
985          <td class="paramtype">krb5_const_principal&nbsp;</td>
986          <td class="paramname"> <em>principal</em>, </td>
987        </tr>
988        <tr>
989          <td class="paramkey"></td>
990          <td></td>
991          <td class="paramtype">int&nbsp;</td>
992          <td class="paramname"> <em>flags</em>, </td>
993        </tr>
994        <tr>
995          <td class="paramkey"></td>
996          <td></td>
997          <td class="paramtype">char *&nbsp;</td>
998          <td class="paramname"> <em>name</em>, </td>
999        </tr>
1000        <tr>
1001          <td class="paramkey"></td>
1002          <td></td>
1003          <td class="paramtype">size_t&nbsp;</td>
1004          <td class="paramname"> <em>len</em></td><td>&nbsp;</td>
1005        </tr>
1006        <tr>
1007          <td></td>
1008          <td>)</td>
1009          <td></td><td></td><td></td>
1010        </tr>
1011      </table>
1012</div>
1013<div class="memdoc">
1014
1015<p>
1016Unparse the principal name with unparse flags to a fixed buffer.<p>
1017<dl compact><dt><b>Parameters:</b></dt><dd>
1018  <table border="0" cellspacing="2" cellpadding="0">
1019    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>A Kerberos context. </td></tr>
1020    <tr><td valign="top"></td><td valign="top"><em>principal</em>&nbsp;</td><td>principal to unparse </td></tr>
1021    <tr><td valign="top"></td><td valign="top"><em>flags</em>&nbsp;</td><td>unparse flags </td></tr>
1022    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>buffer to write name to </td></tr>
1023    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>length of buffer</td></tr>
1024  </table>
1025</dl>
1026<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl>
1027
1028</div>
1029</div><p>
1030<a class="anchor" name="gcebe44e0685fc7b6c89a53eca71e7d24"></a><!-- doxytag: member="principal.c::krb5_unparse_name_fixed_short" ref="gcebe44e0685fc7b6c89a53eca71e7d24" args="(krb5_context context, krb5_const_principal principal, char *name, size_t len)" -->
1031<div class="memitem">
1032<div class="memproto">
1033      <table class="memname">
1034        <tr>
1035          <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_unparse_name_fixed_short           </td>
1036          <td>(</td>
1037          <td class="paramtype">krb5_context&nbsp;</td>
1038          <td class="paramname"> <em>context</em>, </td>
1039        </tr>
1040        <tr>
1041          <td class="paramkey"></td>
1042          <td></td>
1043          <td class="paramtype">krb5_const_principal&nbsp;</td>
1044          <td class="paramname"> <em>principal</em>, </td>
1045        </tr>
1046        <tr>
1047          <td class="paramkey"></td>
1048          <td></td>
1049          <td class="paramtype">char *&nbsp;</td>
1050          <td class="paramname"> <em>name</em>, </td>
1051        </tr>
1052        <tr>
1053          <td class="paramkey"></td>
1054          <td></td>
1055          <td class="paramtype">size_t&nbsp;</td>
1056          <td class="paramname"> <em>len</em></td><td>&nbsp;</td>
1057        </tr>
1058        <tr>
1059          <td></td>
1060          <td>)</td>
1061          <td></td><td></td><td></td>
1062        </tr>
1063      </table>
1064</div>
1065<div class="memdoc">
1066
1067<p>
1068Unparse the principal name to a fixed buffer. The realm is skipped if its a default realm.<p>
1069<dl compact><dt><b>Parameters:</b></dt><dd>
1070  <table border="0" cellspacing="2" cellpadding="0">
1071    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>A Kerberos context. </td></tr>
1072    <tr><td valign="top"></td><td valign="top"><em>principal</em>&nbsp;</td><td>principal to unparse </td></tr>
1073    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>buffer to write name to </td></tr>
1074    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>length of buffer</td></tr>
1075  </table>
1076</dl>
1077<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl>
1078
1079</div>
1080</div><p>
1081<a class="anchor" name="gd46122cd0e543b6c1219abb8730378e7"></a><!-- doxytag: member="principal.c::krb5_unparse_name_flags" ref="gd46122cd0e543b6c1219abb8730378e7" args="(krb5_context context, krb5_const_principal principal, int flags, char **name)" -->
1082<div class="memitem">
1083<div class="memproto">
1084      <table class="memname">
1085        <tr>
1086          <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_unparse_name_flags           </td>
1087          <td>(</td>
1088          <td class="paramtype">krb5_context&nbsp;</td>
1089          <td class="paramname"> <em>context</em>, </td>
1090        </tr>
1091        <tr>
1092          <td class="paramkey"></td>
1093          <td></td>
1094          <td class="paramtype">krb5_const_principal&nbsp;</td>
1095          <td class="paramname"> <em>principal</em>, </td>
1096        </tr>
1097        <tr>
1098          <td class="paramkey"></td>
1099          <td></td>
1100          <td class="paramtype">int&nbsp;</td>
1101          <td class="paramname"> <em>flags</em>, </td>
1102        </tr>
1103        <tr>
1104          <td class="paramkey"></td>
1105          <td></td>
1106          <td class="paramtype">char **&nbsp;</td>
1107          <td class="paramname"> <em>name</em></td><td>&nbsp;</td>
1108        </tr>
1109        <tr>
1110          <td></td>
1111          <td>)</td>
1112          <td></td><td></td><td></td>
1113        </tr>
1114      </table>
1115</div>
1116<div class="memdoc">
1117
1118<p>
1119Unparse the Kerberos name into a string<p>
1120<dl compact><dt><b>Parameters:</b></dt><dd>
1121  <table border="0" cellspacing="2" cellpadding="0">
1122    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>Kerberos 5 context </td></tr>
1123    <tr><td valign="top"></td><td valign="top"><em>principal</em>&nbsp;</td><td>principal to query </td></tr>
1124    <tr><td valign="top"></td><td valign="top"><em>flags</em>&nbsp;</td><td>flag to determine the behavior </td></tr>
1125    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>resulting string, free with krb5_xfree()</td></tr>
1126  </table>
1127</dl>
1128<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl>
1129
1130</div>
1131</div><p>
1132<a class="anchor" name="g600247895edbde37e195c8b2089295a3"></a><!-- doxytag: member="principal.c::krb5_unparse_name_short" ref="g600247895edbde37e195c8b2089295a3" args="(krb5_context context, krb5_const_principal principal, char **name)" -->
1133<div class="memitem">
1134<div class="memproto">
1135      <table class="memname">
1136        <tr>
1137          <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_unparse_name_short           </td>
1138          <td>(</td>
1139          <td class="paramtype">krb5_context&nbsp;</td>
1140          <td class="paramname"> <em>context</em>, </td>
1141        </tr>
1142        <tr>
1143          <td class="paramkey"></td>
1144          <td></td>
1145          <td class="paramtype">krb5_const_principal&nbsp;</td>
1146          <td class="paramname"> <em>principal</em>, </td>
1147        </tr>
1148        <tr>
1149          <td class="paramkey"></td>
1150          <td></td>
1151          <td class="paramtype">char **&nbsp;</td>
1152          <td class="paramname"> <em>name</em></td><td>&nbsp;</td>
1153        </tr>
1154        <tr>
1155          <td></td>
1156          <td>)</td>
1157          <td></td><td></td><td></td>
1158        </tr>
1159      </table>
1160</div>
1161<div class="memdoc">
1162
1163<p>
1164Unparse the principal name to a allocated buffer. The realm is skipped if its a default realm.<p>
1165<dl compact><dt><b>Parameters:</b></dt><dd>
1166  <table border="0" cellspacing="2" cellpadding="0">
1167    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>A Kerberos context. </td></tr>
1168    <tr><td valign="top"></td><td valign="top"><em>principal</em>&nbsp;</td><td>principal to unparse </td></tr>
1169    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>returned buffer, free with krb5_xfree()</td></tr>
1170  </table>
1171</dl>
1172<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl>
1173
1174</div>
1175</div><p>
1176</div>
1177<hr size="1"><address style="text-align: right;"><small>
1178Generated on Wed Jan 11 14:07:48 2012 for HeimdalKerberos5library by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6</small></address>
1179</body>
1180</html>
1181