|
Packit |
fd8b60 |
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
|
|
Packit |
fd8b60 |
/*
|
|
Packit |
fd8b60 |
* Copyright (C) 2004 by the Massachusetts Institute of Technology,
|
|
Packit |
fd8b60 |
* Cambridge, MA, USA. All Rights Reserved.
|
|
Packit |
fd8b60 |
*
|
|
Packit |
fd8b60 |
* This software is being provided to you, the LICENSEE, by the
|
|
Packit |
fd8b60 |
* Massachusetts Institute of Technology (M.I.T.) under the following
|
|
Packit |
fd8b60 |
* license. By obtaining, using and/or copying this software, you agree
|
|
Packit |
fd8b60 |
* that you have read, understood, and will comply with these terms and
|
|
Packit |
fd8b60 |
* conditions:
|
|
Packit |
fd8b60 |
*
|
|
Packit |
fd8b60 |
* Export of this software from the United States of America may
|
|
Packit |
fd8b60 |
* require a specific license from the United States Government.
|
|
Packit |
fd8b60 |
* It is the responsibility of any person or organization contemplating
|
|
Packit |
fd8b60 |
* export to obtain such a license before exporting.
|
|
Packit |
fd8b60 |
*
|
|
Packit |
fd8b60 |
* WITHIN THAT CONSTRAINT, permission to use, copy, modify and distribute
|
|
Packit |
fd8b60 |
* this software and its documentation for any purpose and without fee or
|
|
Packit |
fd8b60 |
* royalty is hereby granted, provided that you agree to comply with the
|
|
Packit |
fd8b60 |
* following copyright notice and statements, including the disclaimer, and
|
|
Packit |
fd8b60 |
* that the same appear on ALL copies of the software and documentation,
|
|
Packit |
fd8b60 |
* including modifications that you make for internal use or for
|
|
Packit |
fd8b60 |
* distribution:
|
|
Packit |
fd8b60 |
*
|
|
Packit |
fd8b60 |
* THIS SOFTWARE IS PROVIDED "AS IS", AND M.I.T. MAKES NO REPRESENTATIONS
|
|
Packit |
fd8b60 |
* OR WARRANTIES, EXPRESS OR IMPLIED. By way of example, but not
|
|
Packit |
fd8b60 |
* limitation, M.I.T. MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
|
Packit |
fd8b60 |
* MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF
|
|
Packit |
fd8b60 |
* THE LICENSED SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY
|
|
Packit |
fd8b60 |
* PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
|
|
Packit |
fd8b60 |
*
|
|
Packit |
fd8b60 |
* The name of the Massachusetts Institute of Technology or M.I.T. may NOT
|
|
Packit |
fd8b60 |
* be used in advertising or publicity pertaining to distribution of the
|
|
Packit |
fd8b60 |
* software. Title to copyright in this software and any associated
|
|
Packit |
fd8b60 |
* documentation shall at all times remain with M.I.T., and USER agrees to
|
|
Packit |
fd8b60 |
* preserve same.
|
|
Packit |
fd8b60 |
*
|
|
Packit |
fd8b60 |
* Furthermore if you modify this software you must label
|
|
Packit |
fd8b60 |
* your software as modified software and not distribute it in such a
|
|
Packit |
fd8b60 |
* fashion that it might be confused with the original M.I.T. software.
|
|
Packit |
fd8b60 |
*/
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
/* Stuff that needs initialization for fake-addrinfo.c.
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
Separated out, so that static linking against this library doesn't
|
|
Packit |
fd8b60 |
require pulling in socket/nsl/whatever libraries for code not using
|
|
Packit |
fd8b60 |
getaddrinfo. */
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
#include "k5-platform.h"
|
|
Packit |
fd8b60 |
#include "k5-thread.h"
|
|
Packit |
fd8b60 |
#include "port-sockets.h"
|
|
Packit |
fd8b60 |
#include "socket-utils.h"
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
#define IMPLEMENT_FAKE_GETADDRINFO
|
|
Packit |
fd8b60 |
#include "fake-addrinfo.h"
|
|
Packit |
fd8b60 |
#include "cache-addrinfo.h"
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
struct fac krb5int_fac = { K5_MUTEX_PARTIAL_INITIALIZER, 0 };
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
int krb5int_init_fac (void)
|
|
Packit |
fd8b60 |
{
|
|
Packit |
fd8b60 |
return k5_mutex_finish_init(&krb5int_fac.lock);
|
|
Packit |
fd8b60 |
}
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
void krb5int_fini_fac (void)
|
|
Packit |
fd8b60 |
{
|
|
Packit |
fd8b60 |
k5_mutex_destroy(&krb5int_fac.lock);
|
|
Packit |
fd8b60 |
}
|