1226031Sstas<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2226031Sstas<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 3226031Sstas<title>HeimdalKerberos5library: Heimdal Kerberos 5 principal functions</title> 4226031Sstas<link href="doxygen.css" rel="stylesheet" type="text/css"> 5226031Sstas<link href="tabs.css" rel="stylesheet" type="text/css"> 6226031Sstas</head><body> 7226031Sstas<p> 8226031Sstas<a href="http://www.h5l.org/"><img src="http://www.h5l.org/keyhole-heimdal.png" alt="keyhole logo"/></a> 9226031Sstas</p> 10226031Sstas<!-- end of header marker --> 11226031Sstas<!-- Generated by Doxygen 1.5.6 --> 12226031Sstas<div class="navigation" id="top"> 13226031Sstas <div class="tabs"> 14226031Sstas <ul> 15226031Sstas <li><a href="index.html"><span>Main Page</span></a></li> 16226031Sstas <li><a href="pages.html"><span>Related Pages</span></a></li> 17226031Sstas <li><a href="modules.html"><span>Modules</span></a></li> 18226031Sstas <li><a href="annotated.html"><span>Data Structures</span></a></li> 19226031Sstas </ul> 20226031Sstas </div> 21226031Sstas</div> 22226031Sstas<div class="contents"> 23226031Sstas<h1>Heimdal Kerberos 5 principal functions</h1><table border="0" cellpadding="0" cellspacing="0"> 24226031Sstas<tr><td></td></tr> 25226031Sstas<tr><td colspan="2"><br><h2>Functions</h2></td></tr> 26226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION void <br> 27226031SstasKRB5_LIB_CALL </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> 28226031Sstas 29226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION void <br> 30226031SstasKRB5_LIB_CALL </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> 31226031Sstas 32226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION int KRB5_LIB_CALL </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> 33226031Sstas 34226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION const char <br> 35226031Sstas*KRB5_LIB_CALL </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> 36226031Sstas 37226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION unsigned int <br> 38226031SstasKRB5_LIB_CALL </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> 39226031Sstas 40226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 41226031Sstaskrb5_error_code KRB5_LIB_CALL </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> 42226031Sstas 43226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 44226031Sstaskrb5_error_code KRB5_LIB_CALL </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> 45226031Sstas 46226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 47226031Sstaskrb5_error_code KRB5_LIB_CALL </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> 48226031Sstas 49226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 50226031Sstaskrb5_error_code KRB5_LIB_CALL </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> 51226031Sstas 52226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 53226031Sstaskrb5_error_code KRB5_LIB_CALL </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> 54226031Sstas 55226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 56226031Sstaskrb5_error_code KRB5_LIB_CALL </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> 57226031Sstas 58226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 59226031Sstaskrb5_error_code KRB5_LIB_CALL </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> 60226031Sstas 61226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 62226031Sstaskrb5_error_code KRB5_LIB_CALL </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> 63226031Sstas 64226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 65226031Sstaskrb5_error_code KRB5_LIB_CALL </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> 66226031Sstas 67226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 68226031Sstaskrb5_error_code KRB5_LIB_CALL </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> 69226031Sstas 70226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 71226031Sstaskrb5_error_code KRB5_LIB_CALL </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> 72226031Sstas 73226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 74226031Sstaskrb5_error_code KRB5_LIB_CALL </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> 75226031Sstas 76226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION krb5_boolean <br> 77226031SstasKRB5_LIB_CALL </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> 78226031Sstas 79226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION krb5_boolean <br> 80226031SstasKRB5_LIB_CALL </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> 81226031Sstas 82226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION krb5_boolean <br> 83226031SstasKRB5_LIB_CALL </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> 84226031Sstas 85226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION krb5_boolean <br> 86226031SstasKRB5_LIB_CALL </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> 87226031Sstas 88226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 89226031Sstaskrb5_error_code KRB5_LIB_CALL </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> 90226031Sstas 91226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 92226031Sstaskrb5_error_code KRB5_LIB_CALL </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> 93226031Sstas 94226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION krb5_boolean <br> 95226031SstasKRB5_LIB_CALL </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> 96226031Sstas 97226031Sstas</table> 98226031Sstas<hr><a name="_details"></a><h2>Detailed Description</h2> 99226031Sstas<hr><h2>Function Documentation</h2> 100226031Sstas<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,...)" --> 101226031Sstas<div class="memitem"> 102226031Sstas<div class="memproto"> 103226031Sstas <table class="memname"> 104226031Sstas <tr> 105226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_build_principal </td> 106226031Sstas <td>(</td> 107226031Sstas <td class="paramtype">krb5_context </td> 108226031Sstas <td class="paramname"> <em>context</em>, </td> 109226031Sstas </tr> 110226031Sstas <tr> 111226031Sstas <td class="paramkey"></td> 112226031Sstas <td></td> 113226031Sstas <td class="paramtype">krb5_principal * </td> 114226031Sstas <td class="paramname"> <em>principal</em>, </td> 115226031Sstas </tr> 116226031Sstas <tr> 117226031Sstas <td class="paramkey"></td> 118226031Sstas <td></td> 119226031Sstas <td class="paramtype">int </td> 120226031Sstas <td class="paramname"> <em>rlen</em>, </td> 121226031Sstas </tr> 122226031Sstas <tr> 123226031Sstas <td class="paramkey"></td> 124226031Sstas <td></td> 125226031Sstas <td class="paramtype">krb5_const_realm </td> 126226031Sstas <td class="paramname"> <em>realm</em>, </td> 127226031Sstas </tr> 128226031Sstas <tr> 129226031Sstas <td class="paramkey"></td> 130226031Sstas <td></td> 131226031Sstas <td class="paramtype"> </td> 132226031Sstas <td class="paramname"> <em>...</em></td><td> </td> 133226031Sstas </tr> 134226031Sstas <tr> 135226031Sstas <td></td> 136226031Sstas <td>)</td> 137226031Sstas <td></td><td></td><td></td> 138226031Sstas </tr> 139226031Sstas </table> 140226031Sstas</div> 141226031Sstas<div class="memdoc"> 142226031Sstas 143226031Sstas<p> 144226031SstasBuild a principal using vararg style building<p> 145226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 146226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 147226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>A Kerberos context. </td></tr> 148226031Sstas <tr><td valign="top"></td><td valign="top"><em>principal</em> </td><td>returned principal </td></tr> 149226031Sstas <tr><td valign="top"></td><td valign="top"><em>rlen</em> </td><td>length of realm </td></tr> 150226031Sstas <tr><td valign="top"></td><td valign="top"><em>realm</em> </td><td>realm name </td></tr> 151226031Sstas <tr><td valign="top"></td><td valign="top"><em>...</em> </td><td>a list of components ended with NULL.</td></tr> 152226031Sstas </table> 153226031Sstas</dl> 154226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl> 155226031Sstas 156226031Sstas</div> 157226031Sstas</div><p> 158226031Sstas<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)" --> 159226031Sstas<div class="memitem"> 160226031Sstas<div class="memproto"> 161226031Sstas <table class="memname"> 162226031Sstas <tr> 163226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_principal </td> 164226031Sstas <td>(</td> 165226031Sstas <td class="paramtype">krb5_context </td> 166226031Sstas <td class="paramname"> <em>context</em>, </td> 167226031Sstas </tr> 168226031Sstas <tr> 169226031Sstas <td class="paramkey"></td> 170226031Sstas <td></td> 171226031Sstas <td class="paramtype">krb5_const_principal </td> 172226031Sstas <td class="paramname"> <em>inprinc</em>, </td> 173226031Sstas </tr> 174226031Sstas <tr> 175226031Sstas <td class="paramkey"></td> 176226031Sstas <td></td> 177226031Sstas <td class="paramtype">krb5_principal * </td> 178226031Sstas <td class="paramname"> <em>outprinc</em></td><td> </td> 179226031Sstas </tr> 180226031Sstas <tr> 181226031Sstas <td></td> 182226031Sstas <td>)</td> 183226031Sstas <td></td><td></td><td></td> 184226031Sstas </tr> 185226031Sstas </table> 186226031Sstas</div> 187226031Sstas<div class="memdoc"> 188226031Sstas 189226031Sstas<p> 190226031SstasCopy a principal<p> 191226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 192226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 193226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>A Kerberos context. </td></tr> 194226031Sstas <tr><td valign="top"></td><td valign="top"><em>inprinc</em> </td><td>principal to copy </td></tr> 195226031Sstas <tr><td valign="top"></td><td valign="top"><em>outprinc</em> </td><td>copied principal, free with <a class="el" href="group__krb5__principal.html#g5bd3f620ebe8cd4fe44b5c858ba17d22">krb5_free_principal()</a></td></tr> 196226031Sstas </table> 197226031Sstas</dl> 198226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl> 199226031Sstas 200226031Sstas</div> 201226031Sstas</div><p> 202226031Sstas<a class="anchor" name="g5bd3f620ebe8cd4fe44b5c858ba17d22"></a><!-- doxytag: member="principal.c::krb5_free_principal" ref="g5bd3f620ebe8cd4fe44b5c858ba17d22" args="(krb5_context context, krb5_principal p)" --> 203226031Sstas<div class="memitem"> 204226031Sstas<div class="memproto"> 205226031Sstas <table class="memname"> 206226031Sstas <tr> 207226031Sstas <td class="memname">KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_principal </td> 208226031Sstas <td>(</td> 209226031Sstas <td class="paramtype">krb5_context </td> 210226031Sstas <td class="paramname"> <em>context</em>, </td> 211226031Sstas </tr> 212226031Sstas <tr> 213226031Sstas <td class="paramkey"></td> 214226031Sstas <td></td> 215226031Sstas <td class="paramtype">krb5_principal </td> 216226031Sstas <td class="paramname"> <em>p</em></td><td> </td> 217226031Sstas </tr> 218226031Sstas <tr> 219226031Sstas <td></td> 220226031Sstas <td>)</td> 221226031Sstas <td></td><td></td><td></td> 222226031Sstas </tr> 223226031Sstas </table> 224226031Sstas</div> 225226031Sstas<div class="memdoc"> 226226031Sstas 227226031Sstas<p> 228226031SstasFrees 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> 229226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 230226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 231226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>A Kerberos context. </td></tr> 232226031Sstas <tr><td valign="top"></td><td valign="top"><em>p</em> </td><td>a principal to free.</td></tr> 233226031Sstas </table> 234226031Sstas</dl> 235226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl> 236226031Sstas 237226031Sstas</div> 238226031Sstas</div><p> 239226031Sstas<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,...)" --> 240226031Sstas<div class="memitem"> 241226031Sstas<div class="memproto"> 242226031Sstas <table class="memname"> 243226031Sstas <tr> 244226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_make_principal </td> 245226031Sstas <td>(</td> 246226031Sstas <td class="paramtype">krb5_context </td> 247226031Sstas <td class="paramname"> <em>context</em>, </td> 248226031Sstas </tr> 249226031Sstas <tr> 250226031Sstas <td class="paramkey"></td> 251226031Sstas <td></td> 252226031Sstas <td class="paramtype">krb5_principal * </td> 253226031Sstas <td class="paramname"> <em>principal</em>, </td> 254226031Sstas </tr> 255226031Sstas <tr> 256226031Sstas <td class="paramkey"></td> 257226031Sstas <td></td> 258226031Sstas <td class="paramtype">krb5_const_realm </td> 259226031Sstas <td class="paramname"> <em>realm</em>, </td> 260226031Sstas </tr> 261226031Sstas <tr> 262226031Sstas <td class="paramkey"></td> 263226031Sstas <td></td> 264226031Sstas <td class="paramtype"> </td> 265226031Sstas <td class="paramname"> <em>...</em></td><td> </td> 266226031Sstas </tr> 267226031Sstas <tr> 268226031Sstas <td></td> 269226031Sstas <td>)</td> 270226031Sstas <td></td><td></td><td></td> 271226031Sstas </tr> 272226031Sstas </table> 273226031Sstas</div> 274226031Sstas<div class="memdoc"> 275226031Sstas 276226031Sstas<p> 277226031SstasBuild a principal using vararg style building<p> 278226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 279226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 280226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>A Kerberos context. </td></tr> 281226031Sstas <tr><td valign="top"></td><td valign="top"><em>principal</em> </td><td>returned principal </td></tr> 282226031Sstas <tr><td valign="top"></td><td valign="top"><em>realm</em> </td><td>realm name </td></tr> 283226031Sstas <tr><td valign="top"></td><td valign="top"><em>...</em> </td><td>a list of components ended with NULL.</td></tr> 284226031Sstas </table> 285226031Sstas</dl> 286226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl> 287226031Sstas 288226031Sstas</div> 289226031Sstas</div><p> 290226031Sstas<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)" --> 291226031Sstas<div class="memitem"> 292226031Sstas<div class="memproto"> 293226031Sstas <table class="memname"> 294226031Sstas <tr> 295226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_parse_name </td> 296226031Sstas <td>(</td> 297226031Sstas <td class="paramtype">krb5_context </td> 298226031Sstas <td class="paramname"> <em>context</em>, </td> 299226031Sstas </tr> 300226031Sstas <tr> 301226031Sstas <td class="paramkey"></td> 302226031Sstas <td></td> 303226031Sstas <td class="paramtype">const char * </td> 304226031Sstas <td class="paramname"> <em>name</em>, </td> 305226031Sstas </tr> 306226031Sstas <tr> 307226031Sstas <td class="paramkey"></td> 308226031Sstas <td></td> 309226031Sstas <td class="paramtype">krb5_principal * </td> 310226031Sstas <td class="paramname"> <em>principal</em></td><td> </td> 311226031Sstas </tr> 312226031Sstas <tr> 313226031Sstas <td></td> 314226031Sstas <td>)</td> 315226031Sstas <td></td><td></td><td></td> 316226031Sstas </tr> 317226031Sstas </table> 318226031Sstas</div> 319226031Sstas<div class="memdoc"> 320226031Sstas 321226031Sstas<p> 322226031SstasParse a name into a krb5_principal structure<p> 323226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 324226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 325226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos 5 context </td></tr> 326226031Sstas <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>name to parse into a Kerberos principal </td></tr> 327226031Sstas <tr><td valign="top"></td><td valign="top"><em>principal</em> </td><td>returned principal, free with <a class="el" href="group__krb5__principal.html#g5bd3f620ebe8cd4fe44b5c858ba17d22">krb5_free_principal()</a>.</td></tr> 328226031Sstas </table> 329226031Sstas</dl> 330226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl> 331226031Sstas 332226031Sstas</div> 333226031Sstas</div><p> 334226031Sstas<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)" --> 335226031Sstas<div class="memitem"> 336226031Sstas<div class="memproto"> 337226031Sstas <table class="memname"> 338226031Sstas <tr> 339226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_parse_name_flags </td> 340226031Sstas <td>(</td> 341226031Sstas <td class="paramtype">krb5_context </td> 342226031Sstas <td class="paramname"> <em>context</em>, </td> 343226031Sstas </tr> 344226031Sstas <tr> 345226031Sstas <td class="paramkey"></td> 346226031Sstas <td></td> 347226031Sstas <td class="paramtype">const char * </td> 348226031Sstas <td class="paramname"> <em>name</em>, </td> 349226031Sstas </tr> 350226031Sstas <tr> 351226031Sstas <td class="paramkey"></td> 352226031Sstas <td></td> 353226031Sstas <td class="paramtype">int </td> 354226031Sstas <td class="paramname"> <em>flags</em>, </td> 355226031Sstas </tr> 356226031Sstas <tr> 357226031Sstas <td class="paramkey"></td> 358226031Sstas <td></td> 359226031Sstas <td class="paramtype">krb5_principal * </td> 360226031Sstas <td class="paramname"> <em>principal</em></td><td> </td> 361226031Sstas </tr> 362226031Sstas <tr> 363226031Sstas <td></td> 364226031Sstas <td>)</td> 365226031Sstas <td></td><td></td><td></td> 366226031Sstas </tr> 367226031Sstas </table> 368226031Sstas</div> 369226031Sstas<div class="memdoc"> 370226031Sstas 371226031Sstas<p> 372226031SstasParse a name into a krb5_principal structure, flags controls the behavior.<p> 373226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 374226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 375226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos 5 context </td></tr> 376226031Sstas <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>name to parse into a Kerberos principal </td></tr> 377226031Sstas <tr><td valign="top"></td><td valign="top"><em>flags</em> </td><td>flags to control the behavior </td></tr> 378226031Sstas <tr><td valign="top"></td><td valign="top"><em>principal</em> </td><td>returned principal, free with <a class="el" href="group__krb5__principal.html#g5bd3f620ebe8cd4fe44b5c858ba17d22">krb5_free_principal()</a>.</td></tr> 379226031Sstas </table> 380226031Sstas</dl> 381226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl> 382226031Sstas 383226031Sstas</div> 384226031Sstas</div><p> 385226031Sstas<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)" --> 386226031Sstas<div class="memitem"> 387226031Sstas<div class="memproto"> 388226031Sstas <table class="memname"> 389226031Sstas <tr> 390226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_parse_nametype </td> 391226031Sstas <td>(</td> 392226031Sstas <td class="paramtype">krb5_context </td> 393226031Sstas <td class="paramname"> <em>context</em>, </td> 394226031Sstas </tr> 395226031Sstas <tr> 396226031Sstas <td class="paramkey"></td> 397226031Sstas <td></td> 398226031Sstas <td class="paramtype">const char * </td> 399226031Sstas <td class="paramname"> <em>str</em>, </td> 400226031Sstas </tr> 401226031Sstas <tr> 402226031Sstas <td class="paramkey"></td> 403226031Sstas <td></td> 404226031Sstas <td class="paramtype">int32_t * </td> 405226031Sstas <td class="paramname"> <em>nametype</em></td><td> </td> 406226031Sstas </tr> 407226031Sstas <tr> 408226031Sstas <td></td> 409226031Sstas <td>)</td> 410226031Sstas <td></td><td></td><td></td> 411226031Sstas </tr> 412226031Sstas </table> 413226031Sstas</div> 414226031Sstas<div class="memdoc"> 415226031Sstas 416226031Sstas<p> 417226031SstasParse nametype string and return a nametype integer 418226031Sstas</div> 419226031Sstas</div><p> 420226031Sstas<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)" --> 421226031Sstas<div class="memitem"> 422226031Sstas<div class="memproto"> 423226031Sstas <table class="memname"> 424226031Sstas <tr> 425226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_principal_compare </td> 426226031Sstas <td>(</td> 427226031Sstas <td class="paramtype">krb5_context </td> 428226031Sstas <td class="paramname"> <em>context</em>, </td> 429226031Sstas </tr> 430226031Sstas <tr> 431226031Sstas <td class="paramkey"></td> 432226031Sstas <td></td> 433226031Sstas <td class="paramtype">krb5_const_principal </td> 434226031Sstas <td class="paramname"> <em>princ1</em>, </td> 435226031Sstas </tr> 436226031Sstas <tr> 437226031Sstas <td class="paramkey"></td> 438226031Sstas <td></td> 439226031Sstas <td class="paramtype">krb5_const_principal </td> 440226031Sstas <td class="paramname"> <em>princ2</em></td><td> </td> 441226031Sstas </tr> 442226031Sstas <tr> 443226031Sstas <td></td> 444226031Sstas <td>)</td> 445226031Sstas <td></td><td></td><td></td> 446226031Sstas </tr> 447226031Sstas </table> 448226031Sstas</div> 449226031Sstas<div class="memdoc"> 450226031Sstas 451226031Sstas<p> 452226031SstasCompares the two principals, including realm of the principals and returns TRUE if they are the same and FALSE if not.<p> 453226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 454226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 455226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos 5 context </td></tr> 456226031Sstas <tr><td valign="top"></td><td valign="top"><em>princ1</em> </td><td>first principal to compare </td></tr> 457226031Sstas <tr><td valign="top"></td><td valign="top"><em>princ2</em> </td><td>second principal to compare</td></tr> 458226031Sstas </table> 459226031Sstas</dl> 460226031Sstas<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> 461226031Sstas<a class="el" href="group__krb5__principal.html#g15abb49ce86457827a66f4ddfdd5b60c">krb5_realm_compare()</a> </dd></dl> 462226031Sstas 463226031Sstas</div> 464226031Sstas</div><p> 465226031Sstas<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)" --> 466226031Sstas<div class="memitem"> 467226031Sstas<div class="memproto"> 468226031Sstas <table class="memname"> 469226031Sstas <tr> 470226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_principal_compare_any_realm </td> 471226031Sstas <td>(</td> 472226031Sstas <td class="paramtype">krb5_context </td> 473226031Sstas <td class="paramname"> <em>context</em>, </td> 474226031Sstas </tr> 475226031Sstas <tr> 476226031Sstas <td class="paramkey"></td> 477226031Sstas <td></td> 478226031Sstas <td class="paramtype">krb5_const_principal </td> 479226031Sstas <td class="paramname"> <em>princ1</em>, </td> 480226031Sstas </tr> 481226031Sstas <tr> 482226031Sstas <td class="paramkey"></td> 483226031Sstas <td></td> 484226031Sstas <td class="paramtype">krb5_const_principal </td> 485226031Sstas <td class="paramname"> <em>princ2</em></td><td> </td> 486226031Sstas </tr> 487226031Sstas <tr> 488226031Sstas <td></td> 489226031Sstas <td>)</td> 490226031Sstas <td></td><td></td><td></td> 491226031Sstas </tr> 492226031Sstas </table> 493226031Sstas</div> 494226031Sstas<div class="memdoc"> 495226031Sstas 496226031Sstas<p> 497226031SstasReturn TRUE iff princ1 == princ2 (without considering the realm)<p> 498226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 499226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 500226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos 5 context </td></tr> 501226031Sstas <tr><td valign="top"></td><td valign="top"><em>princ1</em> </td><td>first principal to compare </td></tr> 502226031Sstas <tr><td valign="top"></td><td valign="top"><em>princ2</em> </td><td>second principal to compare</td></tr> 503226031Sstas </table> 504226031Sstas</dl> 505226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>non zero if equal, 0 if not</dd></dl> 506226031Sstas<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> 507226031Sstas<a class="el" href="group__krb5__principal.html#g15abb49ce86457827a66f4ddfdd5b60c">krb5_realm_compare()</a> </dd></dl> 508226031Sstas 509226031Sstas</div> 510226031Sstas</div><p> 511226031Sstas<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)" --> 512226031Sstas<div class="memitem"> 513226031Sstas<div class="memproto"> 514226031Sstas <table class="memname"> 515226031Sstas <tr> 516226031Sstas <td class="memname">KRB5_LIB_FUNCTION unsigned int KRB5_LIB_CALL krb5_principal_get_num_comp </td> 517226031Sstas <td>(</td> 518226031Sstas <td class="paramtype">krb5_context </td> 519226031Sstas <td class="paramname"> <em>context</em>, </td> 520226031Sstas </tr> 521226031Sstas <tr> 522226031Sstas <td class="paramkey"></td> 523226031Sstas <td></td> 524226031Sstas <td class="paramtype">krb5_const_principal </td> 525226031Sstas <td class="paramname"> <em>principal</em></td><td> </td> 526226031Sstas </tr> 527226031Sstas <tr> 528226031Sstas <td></td> 529226031Sstas <td>)</td> 530226031Sstas <td></td><td></td><td></td> 531226031Sstas </tr> 532226031Sstas </table> 533226031Sstas</div> 534226031Sstas<div class="memdoc"> 535226031Sstas 536226031Sstas<p> 537226031SstasGet number of component is principal.<p> 538226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 539226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 540226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos 5 context </td></tr> 541226031Sstas <tr><td valign="top"></td><td valign="top"><em>principal</em> </td><td>principal to query</td></tr> 542226031Sstas </table> 543226031Sstas</dl> 544226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>number of components in string </dd></dl> 545226031Sstas 546226031Sstas</div> 547226031Sstas</div><p> 548226031Sstas<a class="anchor" name="gccd23426798cf776a96c23a455576362"></a><!-- doxytag: member="principal.c::krb5_principal_get_realm" ref="gccd23426798cf776a96c23a455576362" args="(krb5_context context, krb5_const_principal principal)" --> 549226031Sstas<div class="memitem"> 550226031Sstas<div class="memproto"> 551226031Sstas <table class="memname"> 552226031Sstas <tr> 553226031Sstas <td class="memname">KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL krb5_principal_get_realm </td> 554226031Sstas <td>(</td> 555226031Sstas <td class="paramtype">krb5_context </td> 556226031Sstas <td class="paramname"> <em>context</em>, </td> 557226031Sstas </tr> 558226031Sstas <tr> 559226031Sstas <td class="paramkey"></td> 560226031Sstas <td></td> 561226031Sstas <td class="paramtype">krb5_const_principal </td> 562226031Sstas <td class="paramname"> <em>principal</em></td><td> </td> 563226031Sstas </tr> 564226031Sstas <tr> 565226031Sstas <td></td> 566226031Sstas <td>)</td> 567226031Sstas <td></td><td></td><td></td> 568226031Sstas </tr> 569226031Sstas </table> 570226031Sstas</div> 571226031Sstas<div class="memdoc"> 572226031Sstas 573226031Sstas<p> 574226031SstasGet the realm of the principal<p> 575226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 576226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 577226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>A Kerberos context. </td></tr> 578226031Sstas <tr><td valign="top"></td><td valign="top"><em>principal</em> </td><td>principal to get the realm for</td></tr> 579226031Sstas </table> 580226031Sstas</dl> 581226031Sstas<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> 582226031Sstas 583226031Sstas</div> 584226031Sstas</div><p> 585226031Sstas<a class="anchor" name="gf4a599c42592ff7485753e80b8de67b7"></a><!-- doxytag: member="principal.c::krb5_principal_get_type" ref="gf4a599c42592ff7485753e80b8de67b7" args="(krb5_context context, krb5_const_principal principal)" --> 586226031Sstas<div class="memitem"> 587226031Sstas<div class="memproto"> 588226031Sstas <table class="memname"> 589226031Sstas <tr> 590226031Sstas <td class="memname">KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_principal_get_type </td> 591226031Sstas <td>(</td> 592226031Sstas <td class="paramtype">krb5_context </td> 593226031Sstas <td class="paramname"> <em>context</em>, </td> 594226031Sstas </tr> 595226031Sstas <tr> 596226031Sstas <td class="paramkey"></td> 597226031Sstas <td></td> 598226031Sstas <td class="paramtype">krb5_const_principal </td> 599226031Sstas <td class="paramname"> <em>principal</em></td><td> </td> 600226031Sstas </tr> 601226031Sstas <tr> 602226031Sstas <td></td> 603226031Sstas <td>)</td> 604226031Sstas <td></td><td></td><td></td> 605226031Sstas </tr> 606226031Sstas </table> 607226031Sstas</div> 608226031Sstas<div class="memdoc"> 609226031Sstas 610226031Sstas<p> 611226031SstasGet the type of the principal<p> 612226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 613226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 614226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>A Kerberos context. </td></tr> 615226031Sstas <tr><td valign="top"></td><td valign="top"><em>principal</em> </td><td>principal to get the type for</td></tr> 616226031Sstas </table> 617226031Sstas</dl> 618226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>the type of principal </dd></dl> 619226031Sstas 620226031Sstas</div> 621226031Sstas</div><p> 622226031Sstas<a class="anchor" name="g9b24f6db481f24b86a93702eaa2755fc"></a><!-- doxytag: member="principal.c::krb5_principal_is_krbtgt" ref="g9b24f6db481f24b86a93702eaa2755fc" args="(krb5_context context, krb5_const_principal p)" --> 623226031Sstas<div class="memitem"> 624226031Sstas<div class="memproto"> 625226031Sstas <table class="memname"> 626226031Sstas <tr> 627226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_principal_is_krbtgt </td> 628226031Sstas <td>(</td> 629226031Sstas <td class="paramtype">krb5_context </td> 630226031Sstas <td class="paramname"> <em>context</em>, </td> 631226031Sstas </tr> 632226031Sstas <tr> 633226031Sstas <td class="paramkey"></td> 634226031Sstas <td></td> 635226031Sstas <td class="paramtype">krb5_const_principal </td> 636226031Sstas <td class="paramname"> <em>p</em></td><td> </td> 637226031Sstas </tr> 638226031Sstas <tr> 639226031Sstas <td></td> 640226031Sstas <td>)</td> 641226031Sstas <td></td><td></td><td></td> 642226031Sstas </tr> 643226031Sstas </table> 644226031Sstas</div> 645226031Sstas<div class="memdoc"> 646226031Sstas 647226031Sstas<p> 648226031SstasCheck if the cname part of the principal is a krbtgt principal 649226031Sstas</div> 650226031Sstas</div><p> 651226031Sstas<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)" --> 652226031Sstas<div class="memitem"> 653226031Sstas<div class="memproto"> 654226031Sstas <table class="memname"> 655226031Sstas <tr> 656226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_principal_match </td> 657226031Sstas <td>(</td> 658226031Sstas <td class="paramtype">krb5_context </td> 659226031Sstas <td class="paramname"> <em>context</em>, </td> 660226031Sstas </tr> 661226031Sstas <tr> 662226031Sstas <td class="paramkey"></td> 663226031Sstas <td></td> 664226031Sstas <td class="paramtype">krb5_const_principal </td> 665226031Sstas <td class="paramname"> <em>princ</em>, </td> 666226031Sstas </tr> 667226031Sstas <tr> 668226031Sstas <td class="paramkey"></td> 669226031Sstas <td></td> 670226031Sstas <td class="paramtype">krb5_const_principal </td> 671226031Sstas <td class="paramname"> <em>pattern</em></td><td> </td> 672226031Sstas </tr> 673226031Sstas <tr> 674226031Sstas <td></td> 675226031Sstas <td>)</td> 676226031Sstas <td></td><td></td><td></td> 677226031Sstas </tr> 678226031Sstas </table> 679226031Sstas</div> 680226031Sstas<div class="memdoc"> 681226031Sstas 682226031Sstas<p> 683226031Sstasreturn TRUE iff princ matches pattern 684226031Sstas</div> 685226031Sstas</div><p> 686226031Sstas<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)" --> 687226031Sstas<div class="memitem"> 688226031Sstas<div class="memproto"> 689226031Sstas <table class="memname"> 690226031Sstas <tr> 691226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_principal_set_realm </td> 692226031Sstas <td>(</td> 693226031Sstas <td class="paramtype">krb5_context </td> 694226031Sstas <td class="paramname"> <em>context</em>, </td> 695226031Sstas </tr> 696226031Sstas <tr> 697226031Sstas <td class="paramkey"></td> 698226031Sstas <td></td> 699226031Sstas <td class="paramtype">krb5_principal </td> 700226031Sstas <td class="paramname"> <em>principal</em>, </td> 701226031Sstas </tr> 702226031Sstas <tr> 703226031Sstas <td class="paramkey"></td> 704226031Sstas <td></td> 705226031Sstas <td class="paramtype">krb5_const_realm </td> 706226031Sstas <td class="paramname"> <em>realm</em></td><td> </td> 707226031Sstas </tr> 708226031Sstas <tr> 709226031Sstas <td></td> 710226031Sstas <td>)</td> 711226031Sstas <td></td><td></td><td></td> 712226031Sstas </tr> 713226031Sstas </table> 714226031Sstas</div> 715226031Sstas<div class="memdoc"> 716226031Sstas 717226031Sstas<p> 718226031SstasSet a new realm for a principal, and as a side-effect free the previous realm.<p> 719226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 720226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 721226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>A Kerberos context. </td></tr> 722226031Sstas <tr><td valign="top"></td><td valign="top"><em>principal</em> </td><td>principal set the realm for </td></tr> 723226031Sstas <tr><td valign="top"></td><td valign="top"><em>realm</em> </td><td>the new realm to set</td></tr> 724226031Sstas </table> 725226031Sstas</dl> 726226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl> 727226031Sstas 728226031Sstas</div> 729226031Sstas</div><p> 730226031Sstas<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)" --> 731226031Sstas<div class="memitem"> 732226031Sstas<div class="memproto"> 733226031Sstas <table class="memname"> 734226031Sstas <tr> 735226031Sstas <td class="memname">KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_principal_set_type </td> 736226031Sstas <td>(</td> 737226031Sstas <td class="paramtype">krb5_context </td> 738226031Sstas <td class="paramname"> <em>context</em>, </td> 739226031Sstas </tr> 740226031Sstas <tr> 741226031Sstas <td class="paramkey"></td> 742226031Sstas <td></td> 743226031Sstas <td class="paramtype">krb5_principal </td> 744226031Sstas <td class="paramname"> <em>principal</em>, </td> 745226031Sstas </tr> 746226031Sstas <tr> 747226031Sstas <td class="paramkey"></td> 748226031Sstas <td></td> 749226031Sstas <td class="paramtype">int </td> 750226031Sstas <td class="paramname"> <em>type</em></td><td> </td> 751226031Sstas </tr> 752226031Sstas <tr> 753226031Sstas <td></td> 754226031Sstas <td>)</td> 755226031Sstas <td></td><td></td><td></td> 756226031Sstas </tr> 757226031Sstas </table> 758226031Sstas</div> 759226031Sstas<div class="memdoc"> 760226031Sstas 761226031Sstas<p> 762226031SstasSet the type of the principal<p> 763226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 764226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 765226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>A Kerberos context. </td></tr> 766226031Sstas <tr><td valign="top"></td><td valign="top"><em>principal</em> </td><td>principal to set the type for </td></tr> 767226031Sstas <tr><td valign="top"></td><td valign="top"><em>type</em> </td><td>the new type</td></tr> 768226031Sstas </table> 769226031Sstas</dl> 770226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl> 771226031Sstas 772226031Sstas</div> 773226031Sstas</div><p> 774226031Sstas<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)" --> 775226031Sstas<div class="memitem"> 776226031Sstas<div class="memproto"> 777226031Sstas <table class="memname"> 778226031Sstas <tr> 779226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_realm_compare </td> 780226031Sstas <td>(</td> 781226031Sstas <td class="paramtype">krb5_context </td> 782226031Sstas <td class="paramname"> <em>context</em>, </td> 783226031Sstas </tr> 784226031Sstas <tr> 785226031Sstas <td class="paramkey"></td> 786226031Sstas <td></td> 787226031Sstas <td class="paramtype">krb5_const_principal </td> 788226031Sstas <td class="paramname"> <em>princ1</em>, </td> 789226031Sstas </tr> 790226031Sstas <tr> 791226031Sstas <td class="paramkey"></td> 792226031Sstas <td></td> 793226031Sstas <td class="paramtype">krb5_const_principal </td> 794226031Sstas <td class="paramname"> <em>princ2</em></td><td> </td> 795226031Sstas </tr> 796226031Sstas <tr> 797226031Sstas <td></td> 798226031Sstas <td>)</td> 799226031Sstas <td></td><td></td><td></td> 800226031Sstas </tr> 801226031Sstas </table> 802226031Sstas</div> 803226031Sstas<div class="memdoc"> 804226031Sstas 805226031Sstas<p> 806226031Sstasreturn TRUE iff realm(princ1) == realm(princ2)<p> 807226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 808226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 809226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos 5 context </td></tr> 810226031Sstas <tr><td valign="top"></td><td valign="top"><em>princ1</em> </td><td>first principal to compare </td></tr> 811226031Sstas <tr><td valign="top"></td><td valign="top"><em>princ2</em> </td><td>second principal to compare</td></tr> 812226031Sstas </table> 813226031Sstas</dl> 814226031Sstas<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> 815226031Sstas<a class="el" href="group__krb5__principal.html#g13c84ce37f704c99353888eb03a19ea6">krb5_principal_compare()</a> </dd></dl> 816226031Sstas 817226031Sstas</div> 818226031Sstas</div><p> 819226031Sstas<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)" --> 820226031Sstas<div class="memitem"> 821226031Sstas<div class="memproto"> 822226031Sstas <table class="memname"> 823226031Sstas <tr> 824226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_sname_to_principal </td> 825226031Sstas <td>(</td> 826226031Sstas <td class="paramtype">krb5_context </td> 827226031Sstas <td class="paramname"> <em>context</em>, </td> 828226031Sstas </tr> 829226031Sstas <tr> 830226031Sstas <td class="paramkey"></td> 831226031Sstas <td></td> 832226031Sstas <td class="paramtype">const char * </td> 833226031Sstas <td class="paramname"> <em>hostname</em>, </td> 834226031Sstas </tr> 835226031Sstas <tr> 836226031Sstas <td class="paramkey"></td> 837226031Sstas <td></td> 838226031Sstas <td class="paramtype">const char * </td> 839226031Sstas <td class="paramname"> <em>sname</em>, </td> 840226031Sstas </tr> 841226031Sstas <tr> 842226031Sstas <td class="paramkey"></td> 843226031Sstas <td></td> 844226031Sstas <td class="paramtype">int32_t </td> 845226031Sstas <td class="paramname"> <em>type</em>, </td> 846226031Sstas </tr> 847226031Sstas <tr> 848226031Sstas <td class="paramkey"></td> 849226031Sstas <td></td> 850226031Sstas <td class="paramtype">krb5_principal * </td> 851226031Sstas <td class="paramname"> <em>ret_princ</em></td><td> </td> 852226031Sstas </tr> 853226031Sstas <tr> 854226031Sstas <td></td> 855226031Sstas <td>)</td> 856226031Sstas <td></td><td></td><td></td> 857226031Sstas </tr> 858226031Sstas </table> 859226031Sstas</div> 860226031Sstas<div class="memdoc"> 861226031Sstas 862226031Sstas<p> 863226031SstasCreate 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> 864226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 865226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 866226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>A Kerberos context. </td></tr> 867226031Sstas <tr><td valign="top"></td><td valign="top"><em>hostname</em> </td><td>hostname to use </td></tr> 868226031Sstas <tr><td valign="top"></td><td valign="top"><em>sname</em> </td><td>Service name to use </td></tr> 869226031Sstas <tr><td valign="top"></td><td valign="top"><em>type</em> </td><td>name type of pricipal, use KRB5_NT_SRV_HST or KRB5_NT_UNKNOWN. </td></tr> 870226031Sstas <tr><td valign="top"></td><td valign="top"><em>ret_princ</em> </td><td>return principal, free with <a class="el" href="group__krb5__principal.html#g5bd3f620ebe8cd4fe44b5c858ba17d22">krb5_free_principal()</a>.</td></tr> 871226031Sstas </table> 872226031Sstas</dl> 873226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl> 874226031Sstas 875226031Sstas</div> 876226031Sstas</div><p> 877226031Sstas<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)" --> 878226031Sstas<div class="memitem"> 879226031Sstas<div class="memproto"> 880226031Sstas <table class="memname"> 881226031Sstas <tr> 882226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_unparse_name </td> 883226031Sstas <td>(</td> 884226031Sstas <td class="paramtype">krb5_context </td> 885226031Sstas <td class="paramname"> <em>context</em>, </td> 886226031Sstas </tr> 887226031Sstas <tr> 888226031Sstas <td class="paramkey"></td> 889226031Sstas <td></td> 890226031Sstas <td class="paramtype">krb5_const_principal </td> 891226031Sstas <td class="paramname"> <em>principal</em>, </td> 892226031Sstas </tr> 893226031Sstas <tr> 894226031Sstas <td class="paramkey"></td> 895226031Sstas <td></td> 896226031Sstas <td class="paramtype">char ** </td> 897226031Sstas <td class="paramname"> <em>name</em></td><td> </td> 898226031Sstas </tr> 899226031Sstas <tr> 900226031Sstas <td></td> 901226031Sstas <td>)</td> 902226031Sstas <td></td><td></td><td></td> 903226031Sstas </tr> 904226031Sstas </table> 905226031Sstas</div> 906226031Sstas<div class="memdoc"> 907226031Sstas 908226031Sstas<p> 909226031SstasUnparse the Kerberos name into a string<p> 910226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 911226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 912226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos 5 context </td></tr> 913226031Sstas <tr><td valign="top"></td><td valign="top"><em>principal</em> </td><td>principal to query </td></tr> 914226031Sstas <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>resulting string, free with krb5_xfree()</td></tr> 915226031Sstas </table> 916226031Sstas</dl> 917226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl> 918226031Sstas 919226031Sstas</div> 920226031Sstas</div><p> 921226031Sstas<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)" --> 922226031Sstas<div class="memitem"> 923226031Sstas<div class="memproto"> 924226031Sstas <table class="memname"> 925226031Sstas <tr> 926226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_unparse_name_fixed </td> 927226031Sstas <td>(</td> 928226031Sstas <td class="paramtype">krb5_context </td> 929226031Sstas <td class="paramname"> <em>context</em>, </td> 930226031Sstas </tr> 931226031Sstas <tr> 932226031Sstas <td class="paramkey"></td> 933226031Sstas <td></td> 934226031Sstas <td class="paramtype">krb5_const_principal </td> 935226031Sstas <td class="paramname"> <em>principal</em>, </td> 936226031Sstas </tr> 937226031Sstas <tr> 938226031Sstas <td class="paramkey"></td> 939226031Sstas <td></td> 940226031Sstas <td class="paramtype">char * </td> 941226031Sstas <td class="paramname"> <em>name</em>, </td> 942226031Sstas </tr> 943226031Sstas <tr> 944226031Sstas <td class="paramkey"></td> 945226031Sstas <td></td> 946226031Sstas <td class="paramtype">size_t </td> 947226031Sstas <td class="paramname"> <em>len</em></td><td> </td> 948226031Sstas </tr> 949226031Sstas <tr> 950226031Sstas <td></td> 951226031Sstas <td>)</td> 952226031Sstas <td></td><td></td><td></td> 953226031Sstas </tr> 954226031Sstas </table> 955226031Sstas</div> 956226031Sstas<div class="memdoc"> 957226031Sstas 958226031Sstas<p> 959226031SstasUnparse the principal name to a fixed buffer<p> 960226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 961226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 962226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>A Kerberos context. </td></tr> 963226031Sstas <tr><td valign="top"></td><td valign="top"><em>principal</em> </td><td>principal to unparse </td></tr> 964226031Sstas <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>buffer to write name to </td></tr> 965226031Sstas <tr><td valign="top"></td><td valign="top"><em>len</em> </td><td>length of buffer</td></tr> 966226031Sstas </table> 967226031Sstas</dl> 968226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl> 969226031Sstas 970226031Sstas</div> 971226031Sstas</div><p> 972226031Sstas<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)" --> 973226031Sstas<div class="memitem"> 974226031Sstas<div class="memproto"> 975226031Sstas <table class="memname"> 976226031Sstas <tr> 977226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_unparse_name_fixed_flags </td> 978226031Sstas <td>(</td> 979226031Sstas <td class="paramtype">krb5_context </td> 980226031Sstas <td class="paramname"> <em>context</em>, </td> 981226031Sstas </tr> 982226031Sstas <tr> 983226031Sstas <td class="paramkey"></td> 984226031Sstas <td></td> 985226031Sstas <td class="paramtype">krb5_const_principal </td> 986226031Sstas <td class="paramname"> <em>principal</em>, </td> 987226031Sstas </tr> 988226031Sstas <tr> 989226031Sstas <td class="paramkey"></td> 990226031Sstas <td></td> 991226031Sstas <td class="paramtype">int </td> 992226031Sstas <td class="paramname"> <em>flags</em>, </td> 993226031Sstas </tr> 994226031Sstas <tr> 995226031Sstas <td class="paramkey"></td> 996226031Sstas <td></td> 997226031Sstas <td class="paramtype">char * </td> 998226031Sstas <td class="paramname"> <em>name</em>, </td> 999226031Sstas </tr> 1000226031Sstas <tr> 1001226031Sstas <td class="paramkey"></td> 1002226031Sstas <td></td> 1003226031Sstas <td class="paramtype">size_t </td> 1004226031Sstas <td class="paramname"> <em>len</em></td><td> </td> 1005226031Sstas </tr> 1006226031Sstas <tr> 1007226031Sstas <td></td> 1008226031Sstas <td>)</td> 1009226031Sstas <td></td><td></td><td></td> 1010226031Sstas </tr> 1011226031Sstas </table> 1012226031Sstas</div> 1013226031Sstas<div class="memdoc"> 1014226031Sstas 1015226031Sstas<p> 1016226031SstasUnparse the principal name with unparse flags to a fixed buffer.<p> 1017226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 1018226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 1019226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>A Kerberos context. </td></tr> 1020226031Sstas <tr><td valign="top"></td><td valign="top"><em>principal</em> </td><td>principal to unparse </td></tr> 1021226031Sstas <tr><td valign="top"></td><td valign="top"><em>flags</em> </td><td>unparse flags </td></tr> 1022226031Sstas <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>buffer to write name to </td></tr> 1023226031Sstas <tr><td valign="top"></td><td valign="top"><em>len</em> </td><td>length of buffer</td></tr> 1024226031Sstas </table> 1025226031Sstas</dl> 1026226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl> 1027226031Sstas 1028226031Sstas</div> 1029226031Sstas</div><p> 1030226031Sstas<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)" --> 1031226031Sstas<div class="memitem"> 1032226031Sstas<div class="memproto"> 1033226031Sstas <table class="memname"> 1034226031Sstas <tr> 1035226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_unparse_name_fixed_short </td> 1036226031Sstas <td>(</td> 1037226031Sstas <td class="paramtype">krb5_context </td> 1038226031Sstas <td class="paramname"> <em>context</em>, </td> 1039226031Sstas </tr> 1040226031Sstas <tr> 1041226031Sstas <td class="paramkey"></td> 1042226031Sstas <td></td> 1043226031Sstas <td class="paramtype">krb5_const_principal </td> 1044226031Sstas <td class="paramname"> <em>principal</em>, </td> 1045226031Sstas </tr> 1046226031Sstas <tr> 1047226031Sstas <td class="paramkey"></td> 1048226031Sstas <td></td> 1049226031Sstas <td class="paramtype">char * </td> 1050226031Sstas <td class="paramname"> <em>name</em>, </td> 1051226031Sstas </tr> 1052226031Sstas <tr> 1053226031Sstas <td class="paramkey"></td> 1054226031Sstas <td></td> 1055226031Sstas <td class="paramtype">size_t </td> 1056226031Sstas <td class="paramname"> <em>len</em></td><td> </td> 1057226031Sstas </tr> 1058226031Sstas <tr> 1059226031Sstas <td></td> 1060226031Sstas <td>)</td> 1061226031Sstas <td></td><td></td><td></td> 1062226031Sstas </tr> 1063226031Sstas </table> 1064226031Sstas</div> 1065226031Sstas<div class="memdoc"> 1066226031Sstas 1067226031Sstas<p> 1068226031SstasUnparse the principal name to a fixed buffer. The realm is skipped if its a default realm.<p> 1069226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 1070226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 1071226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>A Kerberos context. </td></tr> 1072226031Sstas <tr><td valign="top"></td><td valign="top"><em>principal</em> </td><td>principal to unparse </td></tr> 1073226031Sstas <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>buffer to write name to </td></tr> 1074226031Sstas <tr><td valign="top"></td><td valign="top"><em>len</em> </td><td>length of buffer</td></tr> 1075226031Sstas </table> 1076226031Sstas</dl> 1077226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl> 1078226031Sstas 1079226031Sstas</div> 1080226031Sstas</div><p> 1081226031Sstas<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)" --> 1082226031Sstas<div class="memitem"> 1083226031Sstas<div class="memproto"> 1084226031Sstas <table class="memname"> 1085226031Sstas <tr> 1086226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_unparse_name_flags </td> 1087226031Sstas <td>(</td> 1088226031Sstas <td class="paramtype">krb5_context </td> 1089226031Sstas <td class="paramname"> <em>context</em>, </td> 1090226031Sstas </tr> 1091226031Sstas <tr> 1092226031Sstas <td class="paramkey"></td> 1093226031Sstas <td></td> 1094226031Sstas <td class="paramtype">krb5_const_principal </td> 1095226031Sstas <td class="paramname"> <em>principal</em>, </td> 1096226031Sstas </tr> 1097226031Sstas <tr> 1098226031Sstas <td class="paramkey"></td> 1099226031Sstas <td></td> 1100226031Sstas <td class="paramtype">int </td> 1101226031Sstas <td class="paramname"> <em>flags</em>, </td> 1102226031Sstas </tr> 1103226031Sstas <tr> 1104226031Sstas <td class="paramkey"></td> 1105226031Sstas <td></td> 1106226031Sstas <td class="paramtype">char ** </td> 1107226031Sstas <td class="paramname"> <em>name</em></td><td> </td> 1108226031Sstas </tr> 1109226031Sstas <tr> 1110226031Sstas <td></td> 1111226031Sstas <td>)</td> 1112226031Sstas <td></td><td></td><td></td> 1113226031Sstas </tr> 1114226031Sstas </table> 1115226031Sstas</div> 1116226031Sstas<div class="memdoc"> 1117226031Sstas 1118226031Sstas<p> 1119226031SstasUnparse the Kerberos name into a string<p> 1120226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 1121226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 1122226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos 5 context </td></tr> 1123226031Sstas <tr><td valign="top"></td><td valign="top"><em>principal</em> </td><td>principal to query </td></tr> 1124226031Sstas <tr><td valign="top"></td><td valign="top"><em>flags</em> </td><td>flag to determine the behavior </td></tr> 1125226031Sstas <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>resulting string, free with krb5_xfree()</td></tr> 1126226031Sstas </table> 1127226031Sstas</dl> 1128226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl> 1129226031Sstas 1130226031Sstas</div> 1131226031Sstas</div><p> 1132226031Sstas<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)" --> 1133226031Sstas<div class="memitem"> 1134226031Sstas<div class="memproto"> 1135226031Sstas <table class="memname"> 1136226031Sstas <tr> 1137226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_unparse_name_short </td> 1138226031Sstas <td>(</td> 1139226031Sstas <td class="paramtype">krb5_context </td> 1140226031Sstas <td class="paramname"> <em>context</em>, </td> 1141226031Sstas </tr> 1142226031Sstas <tr> 1143226031Sstas <td class="paramkey"></td> 1144226031Sstas <td></td> 1145226031Sstas <td class="paramtype">krb5_const_principal </td> 1146226031Sstas <td class="paramname"> <em>principal</em>, </td> 1147226031Sstas </tr> 1148226031Sstas <tr> 1149226031Sstas <td class="paramkey"></td> 1150226031Sstas <td></td> 1151226031Sstas <td class="paramtype">char ** </td> 1152226031Sstas <td class="paramname"> <em>name</em></td><td> </td> 1153226031Sstas </tr> 1154226031Sstas <tr> 1155226031Sstas <td></td> 1156226031Sstas <td>)</td> 1157226031Sstas <td></td><td></td><td></td> 1158226031Sstas </tr> 1159226031Sstas </table> 1160226031Sstas</div> 1161226031Sstas<div class="memdoc"> 1162226031Sstas 1163226031Sstas<p> 1164226031SstasUnparse the principal name to a allocated buffer. The realm is skipped if its a default realm.<p> 1165226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 1166226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 1167226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>A Kerberos context. </td></tr> 1168226031Sstas <tr><td valign="top"></td><td valign="top"><em>principal</em> </td><td>principal to unparse </td></tr> 1169226031Sstas <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>returned buffer, free with krb5_xfree()</td></tr> 1170226031Sstas </table> 1171226031Sstas</dl> 1172226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>An krb5 error code, see krb5_get_error_message(). </dd></dl> 1173226031Sstas 1174226031Sstas</div> 1175226031Sstas</div><p> 1176226031Sstas</div> 1177226031Sstas<hr size="1"><address style="text-align: right;"><small> 1178234027SstasGenerated on Wed Jan 11 14:07:48 2012 for HeimdalKerberos5library by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6</small></address> 1179226031Sstas</body> 1180226031Sstas</html> 1181