2011-05-31 02:38:18 +04:00
/*
* Unix SMB / CIFS implementation .
* kerberos utility library
*
* Copyright ( C ) Andrew Tridgell 2001
* Copyright ( C ) Remus Koos ( remuskoos @ yahoo . com ) 2001
* Copyright ( C ) Luke Howard 2002 - 2003
* Copyright ( C ) Jim McDonough < jmcd @ us . ibm . com > 2003
* Copyright ( C ) Guenther Deschner 2003 - 2008
* Copyright ( C ) Andrew Bartlett < abartlet @ samba . org > 2004 - 2005
* Copyright ( C ) Jeremy Allison 2004 , 2007
* Copyright ( C ) Stefan Metzmacher 2004 - 2005
* Copyright ( C ) Nalin Dahyabhai < nalin @ redhat . com > 2004
* Copyright ( C ) Gerald Carter 2006
*
* This program is free software ; you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program . If not , see < http : //www.gnu.org/licenses/>.
*/
2011-05-31 02:39:09 +04:00
# ifndef _LIBADS_KERBEROS_PROTO_H_
# define _LIBADS_KERBEROS_PROTO_H_
2012-04-22 01:26:18 +04:00
# include "system/kerberos.h"
2014-02-21 21:56:04 +04:00
struct PAC_DATA ;
2010-08-03 01:12:16 +04:00
2014-03-11 21:07:11 +04:00
struct PAC_DATA_CTR {
DATA_BLOB pac_blob ;
struct PAC_DATA * pac_data ;
} ;
2015-06-04 22:10:55 +03:00
# define DEFAULT_KRB5_PORT 88
2011-05-06 14:54:59 +04:00
# include "libads/ads_status.h"
2010-07-02 02:32:52 +04:00
/* The following definitions come from libads/kerberos.c */
int kerberos_kinit_password_ext ( const char * principal ,
const char * password ,
int time_offset ,
time_t * expire_time ,
time_t * renew_till_time ,
const char * cache_name ,
bool request_pac ,
bool add_netbios_addr ,
time_t renewable_time ,
NTSTATUS * ntstatus ) ;
int ads_kdestroy ( const char * cc_name ) ;
char * kerberos_standard_des_salt ( void ) ;
bool kerberos_secrets_store_des_salt ( const char * salt ) ;
2016-02-29 18:21:56 +03:00
char * kerberos_fetch_salt_princ_for_host_princ ( krb5_context context ,
const char * host_princ_s ,
int enctype ) ;
2010-07-02 02:32:52 +04:00
bool kerberos_secrets_store_salting_principal ( const char * service ,
int enctype ,
const char * principal ) ;
int kerberos_kinit_password ( const char * principal ,
const char * password ,
int time_offset ,
const char * cache_name ) ;
bool create_local_private_krb5_conf_for_domain ( const char * realm ,
const char * domain ,
const char * sitename ,
2014-03-07 17:47:31 +04:00
const struct sockaddr_storage * pss ) ;
2010-07-02 02:32:52 +04:00
/* The following definitions come from libads/authdata.c */
NTSTATUS kerberos_return_pac ( TALLOC_CTX * mem_ctx ,
const char * name ,
const char * pass ,
time_t time_offset ,
time_t * expire_time ,
time_t * renew_till_time ,
const char * cache_name ,
bool request_pac ,
bool add_netbios_addr ,
time_t renewable_time ,
const char * impersonate_princ_s ,
2014-01-17 17:29:03 +04:00
const char * local_service ,
2014-03-11 21:07:11 +04:00
struct PAC_DATA_CTR * * pac_data_ctr ) ;
2010-07-02 02:32:52 +04:00
/* The following definitions come from libads/krb5_setpw.c */
ADS_STATUS ads_krb5_set_password ( const char * kdc_host , const char * princ ,
const char * newpw , int time_offset ) ;
ADS_STATUS kerberos_set_password ( const char * kpasswd_server ,
const char * auth_principal , const char * auth_password ,
const char * target_principal , const char * new_password ,
int time_offset ) ;
2011-05-31 02:39:09 +04:00
2012-04-22 01:26:18 +04:00
# ifdef HAVE_KRB5
int create_kerberos_key_from_string ( krb5_context context ,
krb5_principal host_princ ,
2016-02-29 18:21:56 +03:00
krb5_principal salt_princ ,
2012-04-22 01:26:18 +04:00
krb5_data * password ,
krb5_keyblock * key ,
krb5_enctype enctype ,
bool no_salt ) ;
# endif
2011-05-31 02:39:09 +04:00
# endif /* _LIBADS_KERBEROS_PROTO_H_ */