mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-29 02:20:21 +08:00
0c1d8aaaf1
* grp.cc (get_groups): New static function to run the core functionality of initgroups and getgrouplist. (initgroups32): Call get_groups and just create supplementary group list in cygheap. Rename name of first argument to "user". Add an assertion to test for a NULL user name. (initgroups): Rename name of first argument to "user". (getgrouplist): New function. * posix.sgml (std-bsd): Add getgrouplist. * include/cygwin/grp.h (getgrouplist): Declare. * include/cygwin/version.h: Bump API minor number.
51 lines
882 B
C
51 lines
882 B
C
/* cygwin/grp.h
|
|
|
|
Copyright 2002, 2011 Red Hat Inc.
|
|
Written by Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
This file is part of Cygwin.
|
|
|
|
This software is a copyrighted work licensed under the terms of the
|
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
|
details. */
|
|
|
|
#ifndef _CYGWIN_GRP_H_
|
|
#define _CYGWIN_GRP_H_
|
|
|
|
#include <sys/types.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#ifdef __INSIDE_CYGWIN__
|
|
struct __group16
|
|
{
|
|
char *gr_name;
|
|
char *gr_passwd;
|
|
__gid16_t gr_gid;
|
|
char **gr_mem;
|
|
};
|
|
|
|
struct __group32
|
|
{
|
|
char *gr_name;
|
|
char *gr_passwd;
|
|
__gid32_t gr_gid;
|
|
char **gr_mem;
|
|
};
|
|
|
|
struct __group32 * getgrgid32 (__gid32_t gid);
|
|
struct __group32 * getgrnam32 (const char *name);
|
|
__gid32_t getgid32 ();
|
|
__gid32_t getegid32 ();
|
|
#endif
|
|
|
|
extern int getgrouplist (const char *, gid_t, gid_t *, int *);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* _CYGWIN_GRP_H_ */
|