Initial Windows port
This commit is contained in:

committed by
Love Hornquist Astrand

parent
25a2ac726b
commit
b1063ea8fc
@@ -275,7 +275,7 @@ kt_ops_register(krb5_context context)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_init_context(krb5_context *context)
|
||||
{
|
||||
krb5_context p;
|
||||
@@ -318,6 +318,11 @@ krb5_init_context(krb5_context *context)
|
||||
if (ret)
|
||||
goto out;
|
||||
#endif
|
||||
#ifdef NEED_SOCK_INIT
|
||||
if (SOCK_INIT) {
|
||||
p->flags |= KRB5_CTX_F_SOCKETS_INITIALIZED;
|
||||
}
|
||||
#endif
|
||||
|
||||
out:
|
||||
if(ret) {
|
||||
@@ -460,7 +465,7 @@ krb5_copy_context(krb5_context context, krb5_context *out)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_free_context(krb5_context context)
|
||||
{
|
||||
if (context->default_cc_name)
|
||||
@@ -485,6 +490,11 @@ krb5_free_context(krb5_context context)
|
||||
|
||||
HEIMDAL_MUTEX_destroy(context->mutex);
|
||||
free(context->mutex);
|
||||
#ifdef NEED_SOCK_INIT
|
||||
if (context->flags & KRB5_CTX_F_SOCKETS_INITIALIZED) {
|
||||
SOCK_EXIT;
|
||||
}
|
||||
#endif
|
||||
|
||||
memset(context, 0, sizeof(*context));
|
||||
free(context);
|
||||
@@ -502,7 +512,7 @@ krb5_free_context(krb5_context context)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_set_config_files(krb5_context context, char **filenames)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
@@ -557,7 +567,7 @@ add_file(char ***pfilenames, int *len, char *file)
|
||||
* `pq' isn't free, it's up the the caller
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_prepend_config_files(const char *filelist, char **pq, char ***ret_pp)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
@@ -622,7 +632,7 @@ krb5_prepend_config_files(const char *filelist, char **pq, char ***ret_pp)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_prepend_config_files_default(const char *filelist, char ***pfilenames)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
@@ -652,7 +662,7 @@ krb5_prepend_config_files_default(const char *filelist, char ***pfilenames)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_default_config_files(char ***pfilenames)
|
||||
{
|
||||
const char *files = NULL;
|
||||
@@ -679,7 +689,7 @@ krb5_get_default_config_files(char ***pfilenames)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_free_config_files(char **filenames)
|
||||
{
|
||||
char **p;
|
||||
@@ -701,7 +711,7 @@ krb5_free_config_files(char **filenames)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
const krb5_enctype * KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION const krb5_enctype * KRB5_LIB_CALL
|
||||
krb5_kerberos_enctypes(krb5_context context)
|
||||
{
|
||||
static const krb5_enctype p[] = {
|
||||
@@ -762,7 +772,7 @@ default_etypes(krb5_context context, krb5_enctype **etype)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_set_default_in_tkt_etypes(krb5_context context,
|
||||
const krb5_enctype *etypes)
|
||||
{
|
||||
@@ -804,7 +814,7 @@ krb5_set_default_in_tkt_etypes(krb5_context context,
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_default_in_tkt_etypes(krb5_context context,
|
||||
krb5_enctype **etypes)
|
||||
{
|
||||
@@ -838,7 +848,7 @@ krb5_get_default_in_tkt_etypes(krb5_context context,
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_init_ets(krb5_context context)
|
||||
{
|
||||
if(context->et_list == NULL){
|
||||
@@ -873,7 +883,7 @@ krb5_init_ets(krb5_context context)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_set_use_admin_kdc (krb5_context context, krb5_boolean flag)
|
||||
{
|
||||
context->use_admin_kdc = flag;
|
||||
@@ -889,7 +899,7 @@ krb5_set_use_admin_kdc (krb5_context context, krb5_boolean flag)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_get_use_admin_kdc (krb5_context context)
|
||||
{
|
||||
return context->use_admin_kdc;
|
||||
@@ -908,7 +918,7 @@ krb5_get_use_admin_kdc (krb5_context context)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_add_extra_addresses(krb5_context context, krb5_addresses *addresses)
|
||||
{
|
||||
|
||||
@@ -932,7 +942,7 @@ krb5_add_extra_addresses(krb5_context context, krb5_addresses *addresses)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_set_extra_addresses(krb5_context context, const krb5_addresses *addresses)
|
||||
{
|
||||
if(context->extra_addresses)
|
||||
@@ -968,7 +978,7 @@ krb5_set_extra_addresses(krb5_context context, const krb5_addresses *addresses)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_extra_addresses(krb5_context context, krb5_addresses *addresses)
|
||||
{
|
||||
if(context->extra_addresses == NULL) {
|
||||
@@ -991,7 +1001,7 @@ krb5_get_extra_addresses(krb5_context context, krb5_addresses *addresses)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_add_ignore_addresses(krb5_context context, krb5_addresses *addresses)
|
||||
{
|
||||
|
||||
@@ -1015,7 +1025,7 @@ krb5_add_ignore_addresses(krb5_context context, krb5_addresses *addresses)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_set_ignore_addresses(krb5_context context, const krb5_addresses *addresses)
|
||||
{
|
||||
if(context->ignore_addresses)
|
||||
@@ -1050,7 +1060,7 @@ krb5_set_ignore_addresses(krb5_context context, const krb5_addresses *addresses)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_ignore_addresses(krb5_context context, krb5_addresses *addresses)
|
||||
{
|
||||
if(context->ignore_addresses == NULL) {
|
||||
@@ -1072,7 +1082,7 @@ krb5_get_ignore_addresses(krb5_context context, krb5_addresses *addresses)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_set_fcache_version(krb5_context context, int version)
|
||||
{
|
||||
context->fcache_vno = version;
|
||||
@@ -1091,7 +1101,7 @@ krb5_set_fcache_version(krb5_context context, int version)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_fcache_version(krb5_context context, int *version)
|
||||
{
|
||||
*version = context->fcache_vno;
|
||||
@@ -1107,7 +1117,7 @@ krb5_get_fcache_version(krb5_context context, int *version)
|
||||
*/
|
||||
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_is_thread_safe(void)
|
||||
{
|
||||
#ifdef ENABLE_PTHREAD_SUPPORT
|
||||
@@ -1126,7 +1136,7 @@ krb5_is_thread_safe(void)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_set_dns_canonicalize_hostname (krb5_context context, krb5_boolean flag)
|
||||
{
|
||||
if (flag)
|
||||
@@ -1145,7 +1155,7 @@ krb5_set_dns_canonicalize_hostname (krb5_context context, krb5_boolean flag)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_get_dns_canonicalize_hostname (krb5_context context)
|
||||
{
|
||||
return (context->flags & KRB5_CTX_F_DNS_CANONICALIZE_HOSTNAME) ? 1 : 0;
|
||||
@@ -1163,7 +1173,7 @@ krb5_get_dns_canonicalize_hostname (krb5_context context)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_kdc_sec_offset (krb5_context context, int32_t *sec, int32_t *usec)
|
||||
{
|
||||
if (sec)
|
||||
@@ -1204,7 +1214,7 @@ krb5_set_kdc_sec_offset (krb5_context context, int32_t sec, int32_t usec)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
time_t KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION time_t KRB5_LIB_CALL
|
||||
krb5_get_max_time_skew (krb5_context context)
|
||||
{
|
||||
return context->max_skew;
|
||||
@@ -1219,7 +1229,7 @@ krb5_get_max_time_skew (krb5_context context)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_set_max_time_skew (krb5_context context, time_t t)
|
||||
{
|
||||
context->max_skew = t;
|
||||
@@ -1239,7 +1249,7 @@ krb5_set_max_time_skew (krb5_context context, time_t t)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_init_etype (krb5_context context,
|
||||
unsigned *len,
|
||||
krb5_enctype **val,
|
||||
|
Reference in New Issue
Block a user