auth/kerberos: Use talloc_stackframe to avoid memory and FD leak of event context
[kai/samba-autobuild/.git] / source4 / auth / kerberos / kerberos_credentials.h
1 /*
2    Unix SMB/CIFS implementation.
3
4    Kerberos utility functions for GENSEC
5
6    Copyright (C) Andrew Bartlett <abartlet@samba.org> 2004-2010
7
8    This program is free software; you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 3 of the License, or
11    (at your option) any later version.
12
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17
18
19    You should have received a copy of the GNU General Public License
20    along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 */
22
23 krb5_error_code kinit_to_ccache(TALLOC_CTX *parent_ctx,
24                                 struct cli_credentials *credentials,
25                                 struct smb_krb5_context *smb_krb5_context,
26                                 struct tevent_context *event_ctx,
27                                 krb5_ccache ccache,
28                                 enum credentials_obtained *obtained,
29                                 const char **error_string);
30
31 /* Manually prototyped here to avoid needing krb5 headers in most callers */
32 krb5_error_code principal_from_credentials(TALLOC_CTX *parent_ctx,
33                                 struct cli_credentials *credentials,
34                                 struct smb_krb5_context *smb_krb5_context,
35                                 krb5_principal *princ,
36                                 enum credentials_obtained *obtained,
37                                 const char **error_string);