1*cb5caa98Sdjl /* 2*cb5caa98Sdjl * CDDL HEADER START 3*cb5caa98Sdjl * 4*cb5caa98Sdjl * The contents of this file are subject to the terms of the 5*cb5caa98Sdjl * Common Development and Distribution License (the "License"). 6*cb5caa98Sdjl * You may not use this file except in compliance with the License. 7*cb5caa98Sdjl * 8*cb5caa98Sdjl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*cb5caa98Sdjl * or http://www.opensolaris.org/os/licensing. 10*cb5caa98Sdjl * See the License for the specific language governing permissions 11*cb5caa98Sdjl * and limitations under the License. 12*cb5caa98Sdjl * 13*cb5caa98Sdjl * When distributing Covered Code, include this CDDL HEADER in each 14*cb5caa98Sdjl * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*cb5caa98Sdjl * If applicable, add the following below this CDDL HEADER, with the 16*cb5caa98Sdjl * fields enclosed by brackets "[]" replaced with your own identifying 17*cb5caa98Sdjl * information: Portions Copyright [yyyy] [name of copyright owner] 18*cb5caa98Sdjl * 19*cb5caa98Sdjl * CDDL HEADER END 20*cb5caa98Sdjl */ 21*cb5caa98Sdjl /* 22*cb5caa98Sdjl * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 23*cb5caa98Sdjl * Use is subject to license terms. 24*cb5caa98Sdjl */ 25*cb5caa98Sdjl 26*cb5caa98Sdjl #ifndef _NSCD_SELFCRED_H 27*cb5caa98Sdjl #define _NSCD_SELFCRED_H 28*cb5caa98Sdjl 29*cb5caa98Sdjl #pragma ident "%Z%%M% %I% %E% SMI" 30*cb5caa98Sdjl 31*cb5caa98Sdjl #ifdef __cplusplus 32*cb5caa98Sdjl extern "C" { 33*cb5caa98Sdjl #endif 34*cb5caa98Sdjl 35*cb5caa98Sdjl #include <unistd.h> 36*cb5caa98Sdjl #include <door.h> 37*cb5caa98Sdjl #include "nscd_door.h" 38*cb5caa98Sdjl 39*cb5caa98Sdjl /* 40*cb5caa98Sdjl * structure used for door call NSCD_IMHERE 41*cb5caa98Sdjl */ 42*cb5caa98Sdjl typedef struct nscd_imhere { 43*cb5caa98Sdjl int slot; 44*cb5caa98Sdjl } nscd_imhere_t; 45*cb5caa98Sdjl 46*cb5caa98Sdjl /* 47*cb5caa98Sdjl * structure used for door call NSCD_FORK 48*cb5caa98Sdjl */ 49*cb5caa98Sdjl typedef struct nscd_fork { 50*cb5caa98Sdjl int slot; 51*cb5caa98Sdjl uid_t uid; 52*cb5caa98Sdjl gid_t gid; 53*cb5caa98Sdjl } nscd_fork_t; 54*cb5caa98Sdjl 55*cb5caa98Sdjl /* 56*cb5caa98Sdjl * prototypes 57*cb5caa98Sdjl */ 58*cb5caa98Sdjl int _nscd_is_self_cred_on(int recheck, char **dblist); 59*cb5caa98Sdjl void _nscd_set_forker_pid(pid_t pid); 60*cb5caa98Sdjl void _nscd_free_cslots(); 61*cb5caa98Sdjl void _nscd_kill_forker(); 62*cb5caa98Sdjl void _nscd_kill_all_children(); 63*cb5caa98Sdjl void _nscd_proc_iamhere(void *buf, door_desc_t *dp, 64*cb5caa98Sdjl uint_t n_desc, int iam); 65*cb5caa98Sdjl void _nscd_proc_pulse(void *buf, int iam); 66*cb5caa98Sdjl void _nscd_proc_fork(void *buf, int iam); 67*cb5caa98Sdjl void _nscd_proc_alt_get(void *buf, int *door); 68*cb5caa98Sdjl void _nscd_start_forker(char *path, int argc, char **argv); 69*cb5caa98Sdjl void _nscd_peruser_getadmin(void *buf, int buf_size); 70*cb5caa98Sdjl 71*cb5caa98Sdjl #ifdef __cplusplus 72*cb5caa98Sdjl } 73*cb5caa98Sdjl #endif 74*cb5caa98Sdjl 75*cb5caa98Sdjl #endif /* _NSCD_SELFCRED_H */ 76