grp.h revision 90644
1290650Shselasky/*- 2290650Shselasky * Copyright (c) 1989, 1993 3290650Shselasky * The Regents of the University of California. All rights reserved. 4290650Shselasky * (c) UNIX System Laboratories, Inc. 5290650Shselasky * All or some portions of this file are derived from material licensed 6290650Shselasky * to the University of California by American Telephone and Telegraph 7290650Shselasky * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8290650Shselasky * the permission of UNIX System Laboratories, Inc. 9290650Shselasky * 10290650Shselasky * Redistribution and use in source and binary forms, with or without 11290650Shselasky * modification, are permitted provided that the following conditions 12290650Shselasky * are met: 13290650Shselasky * 1. Redistributions of source code must retain the above copyright 14290650Shselasky * notice, this list of conditions and the following disclaimer. 15290650Shselasky * 2. Redistributions in binary form must reproduce the above copyright 16290650Shselasky * notice, this list of conditions and the following disclaimer in the 17290650Shselasky * documentation and/or other materials provided with the distribution. 18290650Shselasky * 3. All advertising materials mentioning features or use of this software 19290650Shselasky * must display the following acknowledgement: 20290650Shselasky * This product includes software developed by the University of 21290650Shselasky * California, Berkeley and its contributors. 22290650Shselasky * 4. Neither the name of the University nor the names of its contributors 23290650Shselasky * may be used to endorse or promote products derived from this software 24290650Shselasky * without specific prior written permission. 25290650Shselasky * 26290650Shselasky * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 27290650Shselasky * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28290650Shselasky * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29290650Shselasky * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 30290650Shselasky * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31290650Shselasky * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32290650Shselasky * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33290650Shselasky * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34290650Shselasky * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35290650Shselasky * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36290650Shselasky * SUCH DAMAGE. 37290650Shselasky * 38290650Shselasky * @(#)grp.h 8.2 (Berkeley) 1/21/94 39290650Shselasky * $FreeBSD: head/include/grp.h 90644 2002-02-14 01:59:47Z imp $ 40290650Shselasky */ 41290650Shselasky 42290650Shselasky#ifndef _GRP_H_ 43290650Shselasky#define _GRP_H_ 44290650Shselasky 45291184Shselasky#ifndef _POSIX_SOURCE 46290650Shselasky#define _PATH_GROUP "/etc/group" 47290650Shselasky#endif 48290650Shselasky 49290650Shselaskystruct group { 50290650Shselasky char *gr_name; /* group name */ 51290650Shselasky char *gr_passwd; /* group password */ 52290650Shselasky gid_t gr_gid; /* group id */ 53290650Shselasky char **gr_mem; /* group members */ 54290650Shselasky}; 55290650Shselasky 56290650Shselasky#include <sys/cdefs.h> 57290650Shselasky 58290650Shselasky__BEGIN_DECLS 59291184Shselaskystruct group *getgrgid __P((gid_t)); 60290650Shselaskystruct group *getgrnam __P((const char *)); 61290650Shselasky#ifndef _POSIX_SOURCE 62290650Shselaskystruct group *getgrent __P((void)); 63290650Shselaskyint setgrent __P((void)); 64290650Shselaskyvoid endgrent __P((void)); 65290650Shselaskyvoid setgrfile __P((const char *)); 66290650Shselaskyint setgroupent __P((int)); 67290650Shselaskychar *group_from_gid __P((gid_t, int)); 68290650Shselasky#endif 69290650Shselasky__END_DECLS 70290650Shselasky 71290650Shselasky#endif /* !_GRP_H_ */ 72290650Shselasky