10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 51676Sjpk * Common Development and Distribution License (the "License"). 61676Sjpk * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 210Sstevel@tonic-gate /* 22*12788Sgary.winiger@oracle.com * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 230Sstevel@tonic-gate */ 240Sstevel@tonic-gate 250Sstevel@tonic-gate #ifndef _LDAPADDENT_H 260Sstevel@tonic-gate #define _LDAPADDENT_H 270Sstevel@tonic-gate 280Sstevel@tonic-gate /* 290Sstevel@tonic-gate * ldapaddent.h 300Sstevel@tonic-gate * common declarations for ldapaddent utility 310Sstevel@tonic-gate */ 320Sstevel@tonic-gate 330Sstevel@tonic-gate #ifdef __cplusplus 340Sstevel@tonic-gate extern "C" { 350Sstevel@tonic-gate #endif 360Sstevel@tonic-gate 370Sstevel@tonic-gate #undef GROUP 380Sstevel@tonic-gate #undef GROUP_OBJ 390Sstevel@tonic-gate #include <nss_dbdefs.h> 400Sstevel@tonic-gate #include <ns_sldap.h> 410Sstevel@tonic-gate #include <nis_dhext.h> 420Sstevel@tonic-gate 430Sstevel@tonic-gate extern unsigned flags; 440Sstevel@tonic-gate #define F_VERBOSE 0x1 450Sstevel@tonic-gate #define F_PASSWD 0x2 460Sstevel@tonic-gate 470Sstevel@tonic-gate #define BIGBUF 8192 480Sstevel@tonic-gate #define BUFSIZ 1024 490Sstevel@tonic-gate #define LDAP_MAXNAMELEN 1024 500Sstevel@tonic-gate #define GENENT_OK 0 510Sstevel@tonic-gate #define GENENT_PARSEERR 1 520Sstevel@tonic-gate #define GENENT_CBERR 2 530Sstevel@tonic-gate #define GENENT_ERR 3 540Sstevel@tonic-gate #define PARSE_ERR_MSG_LEN 512 550Sstevel@tonic-gate 560Sstevel@tonic-gate extern char parse_err_msg[PARSE_ERR_MSG_LEN]; 570Sstevel@tonic-gate extern int continue_onerror; /* do not exit on error */ 580Sstevel@tonic-gate 590Sstevel@tonic-gate struct line_buf { 600Sstevel@tonic-gate char *str; 610Sstevel@tonic-gate int len; 620Sstevel@tonic-gate int alloc; 630Sstevel@tonic-gate }; 640Sstevel@tonic-gate 650Sstevel@tonic-gate struct file_loc { 660Sstevel@tonic-gate off_t offset; 670Sstevel@tonic-gate size_t size; 680Sstevel@tonic-gate }; 690Sstevel@tonic-gate 700Sstevel@tonic-gate extern int genent_user_attr(char *line, int (*cback)()); 710Sstevel@tonic-gate extern int genent_prof_attr(char *line, int (*cback)()); 720Sstevel@tonic-gate extern int genent_exec_attr(char *line, int (*cback)()); 730Sstevel@tonic-gate extern int genent_auth_attr(char *line, int (*cback)()); 741676Sjpk extern int genent_tnrhdb(char *line, int (*cback)()); 751676Sjpk extern int genent_tnrhtp(char *line, int (*cback)()); 761676Sjpk 770Sstevel@tonic-gate extern void dump_user_attr(ns_ldap_result_t *res); 780Sstevel@tonic-gate extern void dump_prof_attr(ns_ldap_result_t *res); 790Sstevel@tonic-gate extern void dump_exec_attr(ns_ldap_result_t *res); 800Sstevel@tonic-gate extern void dump_auth_attr(ns_ldap_result_t *res); 811676Sjpk extern void dump_tnrhdb(ns_ldap_result_t *res); 821676Sjpk extern void dump_tnrhtp(ns_ldap_result_t *res); 830Sstevel@tonic-gate 840Sstevel@tonic-gate #ifdef __cplusplus 850Sstevel@tonic-gate } 860Sstevel@tonic-gate #endif 870Sstevel@tonic-gate 880Sstevel@tonic-gate #endif /* _LDAPADDENT_H */ 89