cb5caa98562cf06753163f558cbcfe30b8f4673adjl/*
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * CDDL HEADER START
cb5caa98562cf06753163f558cbcfe30b8f4673adjl *
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * The contents of this file are subject to the terms of the
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * Common Development and Distribution License (the "License").
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * You may not use this file except in compliance with the License.
cb5caa98562cf06753163f558cbcfe30b8f4673adjl *
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * or http://www.opensolaris.org/os/licensing.
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * See the License for the specific language governing permissions
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * and limitations under the License.
cb5caa98562cf06753163f558cbcfe30b8f4673adjl *
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * When distributing Covered Code, include this CDDL HEADER in each
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * If applicable, add the following below this CDDL HEADER, with the
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * fields enclosed by brackets "[]" replaced with your own identifying
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * information: Portions Copyright [yyyy] [name of copyright owner]
cb5caa98562cf06753163f558cbcfe30b8f4673adjl *
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * CDDL HEADER END
cb5caa98562cf06753163f558cbcfe30b8f4673adjl */
cb5caa98562cf06753163f558cbcfe30b8f4673adjl/*
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * Use is subject to license terms.
cb5caa98562cf06753163f558cbcfe30b8f4673adjl */
cb5caa98562cf06753163f558cbcfe30b8f4673adjl
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#ifndef _NSCD_SELFCRED_H
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#define _NSCD_SELFCRED_H
cb5caa98562cf06753163f558cbcfe30b8f4673adjl
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#pragma ident "%Z%%M% %I% %E% SMI"
cb5caa98562cf06753163f558cbcfe30b8f4673adjl
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#ifdef __cplusplus
cb5caa98562cf06753163f558cbcfe30b8f4673adjlextern "C" {
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#endif
cb5caa98562cf06753163f558cbcfe30b8f4673adjl
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#include <unistd.h>
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#include <door.h>
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#include "nscd_door.h"
cb5caa98562cf06753163f558cbcfe30b8f4673adjl
cb5caa98562cf06753163f558cbcfe30b8f4673adjl/*
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * structure used for door call NSCD_IMHERE
cb5caa98562cf06753163f558cbcfe30b8f4673adjl */
cb5caa98562cf06753163f558cbcfe30b8f4673adjltypedef struct nscd_imhere {
cb5caa98562cf06753163f558cbcfe30b8f4673adjl int slot;
cb5caa98562cf06753163f558cbcfe30b8f4673adjl} nscd_imhere_t;
cb5caa98562cf06753163f558cbcfe30b8f4673adjl
cb5caa98562cf06753163f558cbcfe30b8f4673adjl/*
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * structure used for door call NSCD_FORK
cb5caa98562cf06753163f558cbcfe30b8f4673adjl */
cb5caa98562cf06753163f558cbcfe30b8f4673adjltypedef struct nscd_fork {
cb5caa98562cf06753163f558cbcfe30b8f4673adjl int slot;
cb5caa98562cf06753163f558cbcfe30b8f4673adjl uid_t uid;
cb5caa98562cf06753163f558cbcfe30b8f4673adjl gid_t gid;
cb5caa98562cf06753163f558cbcfe30b8f4673adjl} nscd_fork_t;
cb5caa98562cf06753163f558cbcfe30b8f4673adjl
cb5caa98562cf06753163f558cbcfe30b8f4673adjl/*
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * prototypes
cb5caa98562cf06753163f558cbcfe30b8f4673adjl */
cb5caa98562cf06753163f558cbcfe30b8f4673adjlint _nscd_is_self_cred_on(int recheck, char **dblist);
cb5caa98562cf06753163f558cbcfe30b8f4673adjlvoid _nscd_set_forker_pid(pid_t pid);
cb5caa98562cf06753163f558cbcfe30b8f4673adjlvoid _nscd_free_cslots();
cb5caa98562cf06753163f558cbcfe30b8f4673adjlvoid _nscd_kill_forker();
cb5caa98562cf06753163f558cbcfe30b8f4673adjlvoid _nscd_kill_all_children();
cb5caa98562cf06753163f558cbcfe30b8f4673adjlvoid _nscd_proc_iamhere(void *buf, door_desc_t *dp,
cb5caa98562cf06753163f558cbcfe30b8f4673adjl uint_t n_desc, int iam);
cb5caa98562cf06753163f558cbcfe30b8f4673adjlvoid _nscd_proc_pulse(void *buf, int iam);
cb5caa98562cf06753163f558cbcfe30b8f4673adjlvoid _nscd_proc_fork(void *buf, int iam);
cb5caa98562cf06753163f558cbcfe30b8f4673adjlvoid _nscd_proc_alt_get(void *buf, int *door);
cb5caa98562cf06753163f558cbcfe30b8f4673adjlvoid _nscd_start_forker(char *path, int argc, char **argv);
cb5caa98562cf06753163f558cbcfe30b8f4673adjlvoid _nscd_peruser_getadmin(void *buf, int buf_size);
cb5caa98562cf06753163f558cbcfe30b8f4673adjl
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#ifdef __cplusplus
cb5caa98562cf06753163f558cbcfe30b8f4673adjl}
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#endif
cb5caa98562cf06753163f558cbcfe30b8f4673adjl
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#endif /* _NSCD_SELFCRED_H */