14960Swillf /* 24960Swillf * kadmin/ldap_util/kdb5_ldap_util.h 34960Swillf */ 44960Swillf 54960Swillf /* Copyright (c) 2004-2005, Novell, Inc. 64960Swillf * All rights reserved. 74960Swillf * 84960Swillf * Redistribution and use in source and binary forms, with or without 94960Swillf * modification, are permitted provided that the following conditions are met: 104960Swillf * 114960Swillf * * Redistributions of source code must retain the above copyright notice, 124960Swillf * this list of conditions and the following disclaimer. 134960Swillf * * Redistributions in binary form must reproduce the above copyright 144960Swillf * notice, this list of conditions and the following disclaimer in the 154960Swillf * documentation and/or other materials provided with the distribution. 164960Swillf * * The copyright holder's name is not used to endorse or promote products 174960Swillf * derived from this software without specific prior written permission. 184960Swillf * 194960Swillf * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 204960Swillf * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 214960Swillf * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 224960Swillf * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 234960Swillf * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 244960Swillf * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 254960Swillf * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 264960Swillf * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 274960Swillf * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 284960Swillf * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 294960Swillf * POSSIBILITY OF SUCH DAMAGE. 304960Swillf */ 314960Swillf 32*8092SMark.Phalan@Sun.COM /* 33*8092SMark.Phalan@Sun.COM * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 34*8092SMark.Phalan@Sun.COM * Use is subject to license terms. 35*8092SMark.Phalan@Sun.COM */ 36*8092SMark.Phalan@Sun.COM 37*8092SMark.Phalan@Sun.COM 384960Swillf #ifndef _KDB5_LDAP_UTIL_H_ 394960Swillf #define _KDB5_LDAP_UTIL_H_ 404960Swillf 414960Swillf #include <kdb_ldap.h> 424960Swillf #include "kdb5_ldap_realm.h" 434960Swillf #include "kdb5_ldap_services.h" 444960Swillf #include "kdb5_ldap_policy.h" 454960Swillf 464960Swillf #define MAIN_HELP -1 474960Swillf #define CREATE_REALM 1 484960Swillf #define MODIFY_REALM 2 494960Swillf #define VIEW_REALM 3 504960Swillf #define DESTROY_REALM 4 514960Swillf #define LIST_REALM 5 524960Swillf 534960Swillf #ifdef HAVE_EDIRECTORY 544960Swillf # define CREATE_SERVICE 6 554960Swillf # define MODIFY_SERVICE 7 564960Swillf # define VIEW_SERVICE 8 574960Swillf # define DESTROY_SERVICE 9 584960Swillf # define LIST_SERVICE 10 594960Swillf # define SET_SRV_PW 16 604960Swillf #else 614960Swillf # define STASH_SRV_PW 17 624960Swillf #endif 634960Swillf 644960Swillf #define CREATE_POLICY 11 654960Swillf #define MODIFY_POLICY 12 664960Swillf #define VIEW_POLICY 13 674960Swillf #define DESTROY_POLICY 14 684960Swillf #define LIST_POLICY 15 694960Swillf 70*8092SMark.Phalan@Sun.COM /* Solaris Kerberos */ 71*8092SMark.Phalan@Sun.COM extern char *progname; 72*8092SMark.Phalan@Sun.COM 734960Swillf extern int exit_status; 744960Swillf extern krb5_context util_context; 754960Swillf 764960Swillf extern void usage(); 774960Swillf extern void db_usage(int); 784960Swillf 794960Swillf #define ARG_VAL (--argc > 0 ? (koptarg = *(++argv)) : (char *)(usage(MAIN_HELP), NULL)) 804960Swillf 814960Swillf /* Following are the bitmaps that indicate which of the options among -D, -w, -h, -p & -t 824960Swillf * were specified on the command line. 834960Swillf */ 844960Swillf #define CMD_LDAP_D 0x1 /* set if -D option is specified */ 854960Swillf #define CMD_LDAP_W 0x2 /* set if -w option is specified */ 864960Swillf #define CMD_LDAP_H 0x4 /* set if -h option is specified */ 874960Swillf #define CMD_LDAP_P 0x8 /* set if -p option is specified */ 884960Swillf 894960Swillf #define MAX_PASSWD_LEN 1024 904960Swillf #define MAX_PASSWD_PROMPT_LEN 276 /* max_dn_size(=256) + strlen("Password for \" \"")=20 */ 914960Swillf 924960Swillf #endif /* _KDB5_LDAP_UTIL_H_ */ 93