summaryrefslogtreecommitdiff
path: root/src/include/grp.h
blob: 4516a199edb7a72960bc93a066ea624ef0895c57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* ISC license. */

/*
  This file is part of the nsss package.
  See https://skarnet.org/software/nsss/
*/

#ifndef GRP_H
#define GRP_H

#include <nsss/grp.h>

#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#include <sys/types.h>
extern int getgrouplist (char const *, gid_t, gid_t *, int *) ;
extern int setgroups (size_t, gid_t const *) ;
extern int initgroups (char const *, gid_t) ;
#endif

#ifdef _GNU_SOURCE
#include <stdio.h>
extern struct group *fgetgrent (FILE *) ;
extern int fgetgrent_r (FILE *, struct group *, char *, size_t, struct group **) ;
extern int putgrent (struct group const *, FILE *) ;
#endif

#endif