1.\" $NetBSD: krb5_creds.3,v 1.1.1.3 2014/04/24 12:45:50 pettai Exp $ 2.\" 3.\" Copyright (c) 2004, 2006 Kungliga Tekniska Högskolan 4.\" (Royal Institute of Technology, Stockholm, Sweden). 5.\" All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 10.\" 11.\" 1. Redistributions of source code must retain the above copyright 12.\" notice, this list of conditions and the following disclaimer. 13.\" 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 18.\" 3. Neither the name of the Institute nor the names of its contributors 19.\" may be used to endorse or promote products derived from this software 20.\" without specific prior written permission. 21.\" 22.\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25.\" ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32.\" SUCH DAMAGE. 33.\" 34.\" Id 35.\" 36.Dd May 1, 2006 37.Dt KRB5_CREDS 3 38.Os 39.Sh NAME 40.Nm krb5_creds , 41.Nm krb5_copy_creds , 42.Nm krb5_copy_creds_contents , 43.Nm krb5_free_creds , 44.Nm krb5_free_cred_contents 45.Nd Kerberos 5 credential handling functions 46.Sh LIBRARY 47Kerberos 5 Library (libkrb5, -lkrb5) 48.Sh SYNOPSIS 49.In krb5/krb5.h 50.Ft krb5_error_code 51.Fo krb5_copy_creds 52.Fa "krb5_context context" 53.Fa "const krb5_creds *incred" 54.Fa "krb5_creds **outcred" 55.Fc 56.Ft krb5_error_code 57.Fo krb5_copy_creds_contents 58.Fa "krb5_context context" 59.Fa "const krb5_creds *incred" 60.Fa "krb5_creds *outcred" 61.Fc 62.Ft krb5_error_code 63.Fo krb5_free_creds 64.Fa "krb5_context context" 65.Fa "krb5_creds *outcred" 66.Fc 67.Ft krb5_error_code 68.Fo krb5_free_cred_contents 69.Fa "krb5_context context" 70.Fa "krb5_creds *cred" 71.Fc 72.Sh DESCRIPTION 73.Vt krb5_creds 74holds Kerberos credentials: 75.Bd -literal -offset 76typedef struct krb5_creds { 77 krb5_principal client; 78 krb5_principal server; 79 krb5_keyblock session; 80 krb5_times times; 81 krb5_data ticket; 82 krb5_data second_ticket; 83 krb5_authdata authdata; 84 krb5_addresses addresses; 85 krb5_ticket_flags flags; 86} krb5_creds; 87.Ed 88.Pp 89.Fn krb5_copy_creds 90makes a copy of 91.Fa incred 92to 93.Fa outcred . 94.Fa outcred 95should be freed with 96.Fn krb5_free_creds 97by the caller. 98.Pp 99.Fn krb5_copy_creds_contents 100makes a copy of the content of 101.Fa incred 102to 103.Fa outcreds . 104.Fa outcreds 105should be freed by the called with 106.Fn krb5_free_creds_contents . 107.Pp 108.Fn krb5_free_creds 109frees the content of the 110.Fa cred 111structure and the structure itself. 112.Pp 113.Fn krb5_free_cred_contents 114frees the content of the 115.Fa cred 116structure. 117.Sh SEE ALSO 118.Xr krb5 3 , 119.Xr krb5_compare_creds 3 , 120.Xr krb5_get_init_creds 3 , 121.Xr kerberos 8 122