grp.h

Go to the documentation of this file.
00001 /*-
00002  * Copyright (c) 1989, 1993
00003  *      The Regents of the University of California.  All rights reserved.
00004  * (c) UNIX System Laboratories, Inc.
00005  * All or some portions of this file are derived from material licensed
00006  * to the University of California by American Telephone and Telegraph
00007  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
00008  * the permission of UNIX System Laboratories, Inc.
00009  *
00010  * Redistribution and use in source and binary forms, with or without
00011  * modification, are permitted provided that the following conditions
00012  * are met:
00013  * 1. Redistributions of source code must retain the above copyright
00014  *    notice, this list of conditions and the following disclaimer.
00015  * 2. Redistributions in binary form must reproduce the above copyright
00016  *    notice, this list of conditions and the following disclaimer in the
00017  *    documentation and/or other materials provided with the distribution.
00018  * 3. All advertising materials mentioning features or use of this software
00019  *    must display the following acknowledgement:
00020  *      This product includes software developed by the University of
00021  *      California, Berkeley and its contributors.
00022  * 4. Neither the name of the University nor the names of its contributors
00023  *    may be used to endorse or promote products derived from this software
00024  *    without specific prior written permission.
00025  *
00026  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
00027  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00028  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00029  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
00030  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00031  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00032  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00033  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00034  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00035  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00036  * SUCH DAMAGE.
00037  *
00038  *      @(#)grp.h       8.2 (Berkeley) 1/21/94
00039  * $FreeBSD: src/include/grp.h,v 1.18 2003/04/17 14:15:25 nectar Exp $
00040  * © Portions copyright (c) 2005-2006 Nokia Corporation.  All rights reserved.
00041  */
00042 
00043 #ifndef _GRP_H_
00044 #define _GRP_H_
00045 
00046 #include <sys/cdefs.h>
00047 #include <sys/_types.h>
00048 
00049 #define _PATH_GROUP             "/etc/group"
00050 
00051 #ifndef _GID_T_DECLARED
00052 typedef __gid_t         gid_t;
00053 #define _GID_T_DECLARED
00054 #endif
00055 
00056 #ifndef _SIZE_T_DECLARED
00057 typedef __size_t        size_t;
00058 #define _SIZE_T_DECLARED
00059 #endif
00060 
00061 struct group {
00062         char    *gr_name;               /* group name */
00063         char    *gr_passwd;             /* group password */
00064         gid_t   gr_gid;                 /* group id */
00065         char    **gr_mem;               /* group members */
00066 };
00067 
00068 __BEGIN_DECLS
00069 #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
00070 IMPORT_C void            endgrent(void);
00071 IMPORT_C struct group   *getgrent(void);
00072 #endif
00073 IMPORT_C struct group   *getgrgid(gid_t);
00074 IMPORT_C struct group   *getgrnam(const char *);
00075 
00076 #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
00077 /* XXX IEEE Std 1003.1, 2003 specifies `void setgrent(void)' */
00078 IMPORT_C int             setgrent(void);
00079 IMPORT_C int             getgrgid_r(gid_t, struct group *, char *, size_t,
00080                     struct group **);
00081 IMPORT_C int             getgrnam_r(const char *, struct group *, char *, size_t,
00082                     struct group **);
00083 #endif
00084 __END_DECLS
00085 
00086 #endif /* !_GRP_H_ */

Copyright © Nokia Corporation 2001-2008
Back to top