nkeynes@185: /* $NetBSD: grp.h,v 1.7 1995/04/29 05:30:40 cgd Exp $ */ nkeynes@185: nkeynes@185: /*- nkeynes@185: * Copyright (c) 1989, 1993 nkeynes@185: * The Regents of the University of California. All rights reserved. nkeynes@185: * (c) UNIX System Laboratories, Inc. nkeynes@185: * All or some portions of this file are derived from material licensed nkeynes@185: * to the University of California by American Telephone and Telegraph nkeynes@185: * Co. or Unix System Laboratories, Inc. and are reproduced herein with nkeynes@185: * the permission of UNIX System Laboratories, Inc. nkeynes@185: * nkeynes@185: * Redistribution and use in source and binary forms, with or without nkeynes@185: * modification, are permitted provided that the following conditions nkeynes@185: * are met: nkeynes@185: * 1. Redistributions of source code must retain the above copyright nkeynes@185: * notice, this list of conditions and the following disclaimer. nkeynes@185: * 2. Redistributions in binary form must reproduce the above copyright nkeynes@185: * notice, this list of conditions and the following disclaimer in the nkeynes@185: * documentation and/or other materials provided with the distribution. nkeynes@185: * 3. All advertising materials mentioning features or use of this software nkeynes@185: * must display the following acknowledgement: nkeynes@185: * This product includes software developed by the University of nkeynes@185: * California, Berkeley and its contributors. nkeynes@185: * 4. Neither the name of the University nor the names of its contributors nkeynes@185: * may be used to endorse or promote products derived from this software nkeynes@185: * without specific prior written permission. nkeynes@185: * nkeynes@185: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND nkeynes@185: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE nkeynes@185: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE nkeynes@185: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE nkeynes@185: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL nkeynes@185: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS nkeynes@185: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) nkeynes@185: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT nkeynes@185: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY nkeynes@185: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF nkeynes@185: * SUCH DAMAGE. nkeynes@185: * nkeynes@185: * @(#)grp.h 8.2 (Berkeley) 1/21/94 nkeynes@185: */ nkeynes@185: nkeynes@185: #ifndef _GRP_H_ nkeynes@185: #define _GRP_H_ nkeynes@185: nkeynes@185: #include nkeynes@185: nkeynes@185: #if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) nkeynes@185: #define _PATH_GROUP "/etc/group" nkeynes@185: #endif nkeynes@185: nkeynes@185: struct group { nkeynes@185: char *gr_name; /* group name */ nkeynes@185: char *gr_passwd; /* group password */ nkeynes@185: gid_t gr_gid; /* group id */ nkeynes@185: char **gr_mem; /* group members */ nkeynes@185: }; nkeynes@185: nkeynes@185: nkeynes@185: #ifdef __cplusplus nkeynes@185: extern "C" { nkeynes@185: #endif nkeynes@185: nkeynes@185: struct group *getgrgid (gid_t); nkeynes@185: struct group *getgrnam (const char *); nkeynes@185: int getgrnam_r (const char *, struct group *, nkeynes@185: char *, size_t, struct group **); nkeynes@185: int getgrgid_r (gid_t, struct group *, nkeynes@185: char *, size_t, struct group **); nkeynes@185: #ifndef _POSIX_SOURCE nkeynes@185: struct group *getgrent (void); nkeynes@185: void setgrent (void); nkeynes@185: void endgrent (void); nkeynes@185: void setgrfile (const char *); nkeynes@185: #ifndef _XOPEN_SOURCE nkeynes@185: char *group_from_gid (gid_t, int); nkeynes@185: int setgroupent (int); nkeynes@185: #endif /* !_XOPEN_SOURCE */ nkeynes@185: #endif /* !_POSIX_SOURCE */ nkeynes@185: nkeynes@185: #ifdef __cplusplus nkeynes@185: } nkeynes@185: #endif nkeynes@185: nkeynes@185: #endif /* !_GRP_H_ */