154925bf6Swillf /*
2*d7c57852SGary Mills  * Copyright 2017 Gary Mills
3dd9ccd46S  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
454925bf6Swillf  * Use is subject to license terms.
554925bf6Swillf  */
654925bf6Swillf 
754925bf6Swillf /*
854925bf6Swillf  * kadmin/ldap_util/kdb5_ldap_realm.c
954925bf6Swillf  *
1054925bf6Swillf  * Copyright 1990,1991,2001, 2002 by the Massachusetts Institute of Technology.
1154925bf6Swillf  * All Rights Reserved.
1254925bf6Swillf  *
1354925bf6Swillf  * Export of this software from the United States of America may
1454925bf6Swillf  *   require a specific license from the United States Government.
1554925bf6Swillf  *   It is the responsibility of any person or organization contemplating
1654925bf6Swillf  *   export to obtain such a license before exporting.
1754925bf6Swillf  *
1854925bf6Swillf  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
1954925bf6Swillf  * distribute this software and its documentation for any purpose and
2054925bf6Swillf  * without fee is hereby granted, provided that the above copyright
2154925bf6Swillf  * notice appear in all copies and that both that copyright notice and
2254925bf6Swillf  * this permission notice appear in supporting documentation, and that
2354925bf6Swillf  * the name of M.I.T. not be used in advertising or publicity pertaining
2454925bf6Swillf  * to distribution of the software without specific, written prior
2554925bf6Swillf  * permission.  Furthermore if you modify this software you must label
2654925bf6Swillf  * your software as modified software and not distribute it in such a
2754925bf6Swillf  * fashion that it might be confused with the original M.I.T. software.
2854925bf6Swillf  * M.I.T. makes no representations about the suitability of
2954925bf6Swillf  * this software for any purpose.  It is provided "as is" without express
3054925bf6Swillf  * or implied warranty.
3154925bf6Swillf  */
3254925bf6Swillf 
3354925bf6Swillf /*
3454925bf6Swillf  * Copyright (C) 1998 by the FundsXpress, INC.
3554925bf6Swillf  *
3654925bf6Swillf  * All rights reserved.
3754925bf6Swillf  *
3854925bf6Swillf  * Export of this software from the United States of America may require
3954925bf6Swillf  * a specific license from the United States Government.  It is the
4054925bf6Swillf  * responsibility of any person or organization contemplating export to
4154925bf6Swillf  * obtain such a license before exporting.
4254925bf6Swillf  *
4354925bf6Swillf  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
4454925bf6Swillf  * distribute this software and its documentation for any purpose and
4554925bf6Swillf  * without fee is hereby granted, provided that the above copyright
4654925bf6Swillf  * notice appear in all copies and that both that copyright notice and
4754925bf6Swillf  * this permission notice appear in supporting documentation, and that
4854925bf6Swillf  * the name of FundsXpress. not be used in advertising or publicity pertaining
4954925bf6Swillf  * to distribution of the software without specific, written prior
5054925bf6Swillf  * permission.  FundsXpress makes no representations about the suitability of
5154925bf6Swillf  * this software for any purpose.  It is provided "as is" without express
5254925bf6Swillf  * or implied warranty.
5354925bf6Swillf  *
5454925bf6Swillf  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
5554925bf6Swillf  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
5654925bf6Swillf  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
5754925bf6Swillf  */
5854925bf6Swillf 
5954925bf6Swillf /* Copyright (c) 2004-2005, Novell, Inc.
6054925bf6Swillf  * All rights reserved.
6154925bf6Swillf  *
6254925bf6Swillf  * Redistribution and use in source and binary forms, with or without
6354925bf6Swillf  * modification, are permitted provided that the following conditions are met:
6454925bf6Swillf  *
6554925bf6Swillf  *   * Redistributions of source code must retain the above copyright notice,
6654925bf6Swillf  *       this list of conditions and the following disclaimer.
6754925bf6Swillf  *   * Redistributions in binary form must reproduce the above copyright
6854925bf6Swillf  *       notice, this list of conditions and the following disclaimer in the
6954925bf6Swillf  *       documentation and/or other materials provided with the distribution.
7054925bf6Swillf  *   * The copyright holder's name is not used to endorse or promote products
7154925bf6Swillf  *       derived from this software without specific prior written permission.
7254925bf6Swillf  *
7354925bf6Swillf  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
7454925bf6Swillf  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7554925bf6Swillf  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
7654925bf6Swillf  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
7754925bf6Swillf  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
7854925bf6Swillf  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
7954925bf6Swillf  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
8054925bf6Swillf  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
8154925bf6Swillf  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
8254925bf6Swillf  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
8354925bf6Swillf  * POSSIBILITY OF SUCH DAMAGE.
8454925bf6Swillf  */
8554925bf6Swillf 
8654925bf6Swillf /*
8754925bf6Swillf  * Create / Modify / Destroy / View / List realm(s)
8854925bf6Swillf  */
8954925bf6Swillf 
9054925bf6Swillf /* Needed for getting the definition of KRB5_TL_DB_ARGS */
9154925bf6Swillf #define SECURID
9254925bf6Swillf 
9354925bf6Swillf #include <stdio.h>
94