1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #ifndef _LDAPADDENT_H 28 #define _LDAPADDENT_H 29 30 #pragma ident "%Z%%M% %I% %E% SMI" 31 32 /* 33 * ldapaddent.h 34 * common declarations for ldapaddent utility 35 */ 36 37 #ifdef __cplusplus 38 extern "C" { 39 #endif 40 41 #undef GROUP 42 #undef GROUP_OBJ 43 #include <nss_dbdefs.h> 44 #include <ns_sldap.h> 45 #include <nis_dhext.h> 46 47 extern unsigned flags; 48 #define F_VERBOSE 0x1 49 #define F_PASSWD 0x2 50 51 #define BIGBUF 8192 52 #define BUFSIZ 1024 53 #define LDAP_MAXNAMELEN 1024 54 #define GENENT_OK 0 55 #define GENENT_PARSEERR 1 56 #define GENENT_CBERR 2 57 #define GENENT_ERR 3 58 #define PARSE_ERR_MSG_LEN 512 59 60 extern char parse_err_msg[PARSE_ERR_MSG_LEN]; 61 extern int continue_onerror; /* do not exit on error */ 62 63 struct line_buf { 64 char *str; 65 int len; 66 int alloc; 67 }; 68 69 struct file_loc { 70 off_t offset; 71 size_t size; 72 }; 73 74 extern int genent_user_attr(char *line, int (*cback)()); 75 extern int genent_prof_attr(char *line, int (*cback)()); 76 extern int genent_exec_attr(char *line, int (*cback)()); 77 extern int genent_auth_attr(char *line, int (*cback)()); 78 extern int genent_audit_user(char *line, int (*cback)()); 79 extern void dump_user_attr(ns_ldap_result_t *res); 80 extern void dump_prof_attr(ns_ldap_result_t *res); 81 extern void dump_exec_attr(ns_ldap_result_t *res); 82 extern void dump_auth_attr(ns_ldap_result_t *res); 83 extern void dump_audit_user(ns_ldap_result_t *res); 84 85 #ifdef __cplusplus 86 } 87 #endif 88 89 #endif /* _LDAPADDENT_H */ 90