/*
* This file and its contents are supplied under the terms of the
* Common Development and Distribution License ("CDDL"), version 1.0.
* You may only use this file in accordance with the terms of version
* 1.0 of the CDDL.
*
* A full copy of the text of the CDDL should have accompanied this
* source. A copy of the CDDL is also available via the Internet at
*/
/*
* Copyright 2014 Nexenta Systems, Inc. All rights reserved.
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <syslog.h>
#include <synch.h>
#include <thread.h>
#include "idmapd.h"
#include "libadutils.h"
#include "locate_plugin.h"
/* osconf.h - sigh */
/*
* This is an "override plugin" used by libkrb5. See:
*
* The interface is based on:
*/
/*
* Called by krb5int_locate_server / override_locate_server
*/
void *arg0,
enum locate_service_type svc,
const char *realm,
int socktype,
int family,
void *cbdata)
{
short port;
/*
* Is this a service we want to override?
*/
switch (svc) {
case locate_service_kdc:
break;
case locate_service_kadmin:
break;
case locate_service_kpasswd:
break;
case locate_service_krb524:
default:
return (rc);
}
/*
* Is this a realm we want to override?
*/
goto out;
goto out;
/*
* Yes, this is our domain. Have a DC?
*/
goto out;
}
switch (family) {
case AF_UNSPEC:
break; /* OK */
case AF_INET:
case AF_INET6:
break; /* OK */
/* else fallthrough */
default:
goto out;
}
/*
* Provide the service address we have.
*/
case AF_INET: {
break;
}
case AF_INET6: {
break;
}
default:
goto out;
}
/* rc from cbfunc is special. */
if (rc)
out:
return (rc);
}