Initialize Tizen 2.3
[external/shadow-utils.git] / lib / groupio.h
1 /*
2  * Copyright (c) 1990 - 1994, Julianne Frances Haugh
3  * Copyright (c) 1996 - 2000, Marek Michałkiewicz
4  * Copyright (c) 2001       , Michał Moskal
5  * Copyright (c) 2005       , Tomasz Kłoczko
6  * Copyright (c) 2008       , Nicolas François
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  * 1. Redistributions of source code must retain the above copyright
13  *    notice, this list of conditions and the following disclaimer.
14  * 2. Redistributions in binary form must reproduce the above copyright
15  *    notice, this list of conditions and the following disclaimer in the
16  *    documentation and/or other materials provided with the distribution.
17  * 3. The name of the copyright holders or contributors may not be used to
18  *    endorse or promote products derived from this software without
19  *    specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
24  * PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT
25  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  */
33
34 /* $Id: groupio.h 2783 2009-04-23 21:19:02Z nekral-guest $ */
35 #ifndef _GROUPIO_H
36 #define _GROUPIO_H
37
38 #include <sys/types.h>
39 #include <grp.h>
40
41 extern int gr_close (void);
42 extern /*@observer@*/ /*@null@*/const struct group *gr_locate (const char *name);
43 extern /*@observer@*/ /*@null@*/const struct group *gr_locate_gid (gid_t gid);
44 extern int gr_lock (void);
45 extern int gr_setdbname (const char *filename);
46 extern /*@observer@*/const char *gr_dbname (void);
47 extern /*@observer@*/ /*@null@*/const struct group *gr_next (void);
48 extern int gr_open (int mode);
49 extern int gr_remove (const char *name);
50 extern int gr_rewind (void);
51 extern int gr_unlock (void);
52 extern int gr_update (const struct group *gr);
53 extern int gr_sort (void);
54
55 #endif