source: trunk/server/source4/auth/credentials/credentials_krb5.h

Last change on this file was 745, checked in by Silvan Scherrer, 13 years ago

Samba Server: updated trunk to 3.6.0

File size: 2.1 KB
Line 
1/*
2 samba -- Unix SMB/CIFS implementation.
3
4 Client credentials structure
5
6 Copyright (C) Jelmer Vernooij 2004-2006
7 Copyright (C) Andrew Bartlett <abartlet@samba.org> 2005
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
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#ifndef __CREDENTIALS_KRB5_H__
24#define __CREDENTIALS_KRB5_H__
25
26#include <gssapi/gssapi.h>
27#include <gssapi/gssapi_krb5.h>
28#include <krb5.h>
29
30struct gssapi_creds_container {
31 gss_cred_id_t creds;
32};
33
34/* Manually prototyped here to avoid needing gss headers in most callers */
35int cli_credentials_set_client_gss_creds(struct cli_credentials *cred,
36 struct loadparm_context *lp_ctx,
37 gss_cred_id_t gssapi_cred,
38 enum credentials_obtained obtained,
39 const char **error_string);
40
41/* Manually prototyped here to avoid needing krb5 headers in most callers */
42krb5_error_code principal_from_credentials(TALLOC_CTX *parent_ctx,
43 struct cli_credentials *credentials,
44 struct smb_krb5_context *smb_krb5_context,
45 krb5_principal *princ,
46 enum credentials_obtained *obtained,
47 const char **error_string);
48krb5_error_code impersonate_principal_from_credentials(TALLOC_CTX *parent_ctx,
49 struct cli_credentials *credentials,
50 struct smb_krb5_context *smb_krb5_context,
51 krb5_principal *princ,
52 const char **error_string);
53
54void cli_credentials_invalidate_client_gss_creds(struct cli_credentials *cred,
55 enum credentials_obtained obtained);
56
57#endif /* __CREDENTIALS_KRB5_H__ */
Note: See TracBrowser for help on using the repository browser.