1N/A/*
1N/A * CDDL HEADER START
1N/A *
1N/A * The contents of this file are subject to the terms of the
1N/A * Common Development and Distribution License (the "License").
1N/A * You may not use this file except in compliance with the License.
1N/A *
1N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1N/A * or http://www.opensolaris.org/os/licensing.
1N/A * See the License for the specific language governing permissions
1N/A * and limitations under the License.
1N/A *
1N/A * When distributing Covered Code, include this CDDL HEADER in each
1N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1N/A * If applicable, add the following below this CDDL HEADER, with the
1N/A * fields enclosed by brackets "[]" replaced with your own identifying
1N/A * information: Portions Copyright [yyyy] [name of copyright owner]
1N/A *
1N/A * CDDL HEADER END
1N/A */
1N/A/*
1N/A * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
1N/A */
1N/A
1N/A#ifndef _LDAPADDENT_H
1N/A#define _LDAPADDENT_H
1N/A
1N/A/*
1N/A * ldapaddent.h
1N/A * common declarations for ldapaddent utility
1N/A */
1N/A
1N/A#ifdef __cplusplus
1N/Aextern "C" {
1N/A#endif
1N/A
1N/A#undef GROUP
1N/A#undef GROUP_OBJ
1N/A#include <nss_dbdefs.h>
1N/A#include <ns_sldap.h>
1N/A#include <nis_dhext.h>
1N/A
1N/Aextern unsigned flags;
1N/A#define F_VERBOSE 0x1
1N/A#define F_PASSWD 0x2
1N/A
1N/A#define BIGBUF 8192
1N/A#define BUFSIZ 1024
1N/A#define LDAP_MAXNAMELEN 1024
1N/A#define GENENT_OK 0
1N/A#define GENENT_PARSEERR 1
1N/A#define GENENT_CBERR 2
1N/A#define GENENT_ERR 3
1N/A#define PARSE_ERR_MSG_LEN 512
1N/A
1N/Aextern char parse_err_msg[PARSE_ERR_MSG_LEN];
1N/Aextern int continue_onerror; /* do not exit on error */
1N/A
1N/Astruct line_buf {
1N/A char *str;
1N/A int len;
1N/A int alloc;
1N/A};
1N/A
1N/Astruct file_loc {
1N/A off_t offset;
1N/A size_t size;
1N/A};
1N/A
1N/Aextern int genent_user_attr(char *line, int (*cback)());
1N/Aextern int genent_prof_attr(char *line, int (*cback)());
1N/Aextern int genent_exec_attr(char *line, int (*cback)());
1N/Aextern int genent_auth_attr(char *line, int (*cback)());
1N/Aextern int genent_tnrhdb(char *line, int (*cback)());
1N/Aextern int genent_tnrhtp(char *line, int (*cback)());
1N/A
1N/Aextern void dump_user_attr(ns_ldap_result_t *res);
1N/Aextern void dump_prof_attr(ns_ldap_result_t *res);
1N/Aextern void dump_exec_attr(ns_ldap_result_t *res);
1N/Aextern void dump_auth_attr(ns_ldap_result_t *res);
1N/Aextern void dump_tnrhdb(ns_ldap_result_t *res);
1N/Aextern void dump_tnrhtp(ns_ldap_result_t *res);
1N/A
1N/A#ifdef __cplusplus
1N/A}
1N/A#endif
1N/A
1N/A#endif /* _LDAPADDENT_H */