|
Packit |
fd8b60 |
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
|
|
Packit |
fd8b60 |
/* plugins/kdb/ldap/ldap_util/kdb5_ldap_util.h */
|
|
Packit |
fd8b60 |
/* Copyright (c) 2004-2005, Novell, Inc.
|
|
Packit |
fd8b60 |
* All rights reserved.
|
|
Packit |
fd8b60 |
*
|
|
Packit |
fd8b60 |
* Redistribution and use in source and binary forms, with or without
|
|
Packit |
fd8b60 |
* modification, are permitted provided that the following conditions are met:
|
|
Packit |
fd8b60 |
*
|
|
Packit |
fd8b60 |
* * Redistributions of source code must retain the above copyright notice,
|
|
Packit |
fd8b60 |
* this list of conditions and the following disclaimer.
|
|
Packit |
fd8b60 |
* * Redistributions in binary form must reproduce the above copyright
|
|
Packit |
fd8b60 |
* notice, this list of conditions and the following disclaimer in the
|
|
Packit |
fd8b60 |
* documentation and/or other materials provided with the distribution.
|
|
Packit |
fd8b60 |
* * The copyright holder's name is not used to endorse or promote products
|
|
Packit |
fd8b60 |
* derived from this software without specific prior written permission.
|
|
Packit |
fd8b60 |
*
|
|
Packit |
fd8b60 |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
Packit |
fd8b60 |
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
Packit |
fd8b60 |
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
Packit |
fd8b60 |
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
Packit |
fd8b60 |
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
Packit |
fd8b60 |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
Packit |
fd8b60 |
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
Packit |
fd8b60 |
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
Packit |
fd8b60 |
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
Packit |
fd8b60 |
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
Packit |
fd8b60 |
* POSSIBILITY OF SUCH DAMAGE.
|
|
Packit |
fd8b60 |
*/
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
#include "kdb_ldap.h"
|
|
Packit |
fd8b60 |
#include "kdb5_ldap_realm.h"
|
|
Packit |
fd8b60 |
#include "kdb5_ldap_services.h"
|
|
Packit |
fd8b60 |
#include "kdb5_ldap_policy.h"
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
#define MAIN_HELP -1
|
|
Packit |
fd8b60 |
#define CREATE_REALM 1
|
|
Packit |
fd8b60 |
#define MODIFY_REALM 2
|
|
Packit |
fd8b60 |
#define VIEW_REALM 3
|
|
Packit |
fd8b60 |
#define DESTROY_REALM 4
|
|
Packit |
fd8b60 |
#define LIST_REALM 5
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
#define STASH_SRV_PW 17
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
#define CREATE_POLICY 11
|
|
Packit |
fd8b60 |
#define MODIFY_POLICY 12
|
|
Packit |
fd8b60 |
#define VIEW_POLICY 13
|
|
Packit |
fd8b60 |
#define DESTROY_POLICY 14
|
|
Packit |
fd8b60 |
#define LIST_POLICY 15
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
extern char *progname;
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
extern int exit_status;
|
|
Packit |
fd8b60 |
extern krb5_context util_context;
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
extern void usage(void);
|
|
Packit |
fd8b60 |
extern void db_usage(int);
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
#define ARG_VAL (--argc > 0 ? (koptarg = *(++argv)) : (char *)(db_usage(MAIN_HELP), NULL))
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
/* Following are the bitmaps that indicate which of the options among -D, -w, -h, -p & -t
|
|
Packit |
fd8b60 |
* were specified on the command line.
|
|
Packit |
fd8b60 |
*/
|
|
Packit |
fd8b60 |
#define CMD_LDAP_D 0x1 /* set if -D option is specified */
|
|
Packit |
fd8b60 |
#define CMD_LDAP_W 0x2 /* set if -w option is specified */
|
|
Packit |
fd8b60 |
#define CMD_LDAP_H 0x4 /* set if -h option is specified */
|
|
Packit |
fd8b60 |
#define CMD_LDAP_P 0x8 /* set if -p option is specified */
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
#define MAX_PASSWD_LEN 1024
|
|
Packit |
fd8b60 |
#define MAX_PASSWD_PROMPT_LEN 276 /* max_dn_size(=256) + strlen("Password for \" \"")=20 */
|