s3:libads/kerberos_proto.h: add GPL/Copyright header
[Samba/gebeck_regimport.git] / source3 / libads / kerberos_proto.h
blob8acfb45997812ef19d924e1d1c596cc9e42b1016
1 /*
2 * Unix SMB/CIFS implementation.
3 * kerberos utility library
5 * Copyright (C) Andrew Tridgell 2001
6 * Copyright (C) Remus Koos (remuskoos@yahoo.com) 2001
7 * Copyright (C) Luke Howard 2002-2003
8 * Copyright (C) Jim McDonough <jmcd@us.ibm.com> 2003
9 * Copyright (C) Guenther Deschner 2003-2008
10 * Copyright (C) Andrew Bartlett <abartlet@samba.org> 2004-2005
11 * Copyright (C) Jeremy Allison 2004,2007
12 * Copyright (C) Stefan Metzmacher 2004-2005
13 * Copyright (C) Nalin Dahyabhai <nalin@redhat.com> 2004
14 * Copyright (C) Gerald Carter 2006
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 3 of the License, or
19 * (at your option) any later version.
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
26 * You should have received a copy of the GNU General Public License
27 * along with this program. If not, see <http://www.gnu.org/licenses/>.
30 struct PAC_LOGON_INFO;
32 #include "libads/ads_status.h"
34 /* The following definitions come from libads/kerberos_verify.c */
36 NTSTATUS ads_verify_ticket(TALLOC_CTX *mem_ctx,
37 const char *realm,
38 time_t time_offset,
39 const DATA_BLOB *ticket,
40 char **principal,
41 struct PAC_LOGON_INFO **logon_info,
42 DATA_BLOB *ap_rep,
43 DATA_BLOB *session_key,
44 bool use_replay_cache);
46 /* The following definitions come from libads/kerberos.c */
48 int kerberos_kinit_password_ext(const char *principal,
49 const char *password,
50 int time_offset,
51 time_t *expire_time,
52 time_t *renew_till_time,
53 const char *cache_name,
54 bool request_pac,
55 bool add_netbios_addr,
56 time_t renewable_time,
57 NTSTATUS *ntstatus);
58 int ads_kdestroy(const char *cc_name);
59 char* kerberos_standard_des_salt( void );
60 bool kerberos_secrets_store_des_salt( const char* salt );
61 char* kerberos_secrets_fetch_des_salt( void );
62 char *kerberos_get_default_realm_from_ccache( void );
63 char *kerberos_get_realm_from_hostname(const char *hostname);
65 bool kerberos_secrets_store_salting_principal(const char *service,
66 int enctype,
67 const char *principal);
68 int kerberos_kinit_password(const char *principal,
69 const char *password,
70 int time_offset,
71 const char *cache_name);
72 bool create_local_private_krb5_conf_for_domain(const char *realm,
73 const char *domain,
74 const char *sitename,
75 struct sockaddr_storage *pss,
76 const char *kdc_name);
78 /* The following definitions come from libads/authdata.c */
80 NTSTATUS kerberos_return_pac(TALLOC_CTX *mem_ctx,
81 const char *name,
82 const char *pass,
83 time_t time_offset,
84 time_t *expire_time,
85 time_t *renew_till_time,
86 const char *cache_name,
87 bool request_pac,
88 bool add_netbios_addr,
89 time_t renewable_time,
90 const char *impersonate_princ_s,
91 struct PAC_LOGON_INFO **logon_info);
93 /* The following definitions come from libads/krb5_setpw.c */
95 ADS_STATUS ads_krb5_set_password(const char *kdc_host, const char *princ,
96 const char *newpw, int time_offset);
97 ADS_STATUS kerberos_set_password(const char *kpasswd_server,
98 const char *auth_principal, const char *auth_password,
99 const char *target_principal, const char *new_password,
100 int time_offset);