| 1 |
/**************************************************************************/ |
| 2 |
/* */ |
| 3 |
/* This file is part of Frama-C. */ |
| 4 |
/* */ |
| 5 |
/* Copyright (C) 2007-2022 */ |
| 6 |
/* CEA (Commissariat à l'énergie atomique et aux énergies */ |
| 7 |
/* alternatives) */ |
| 8 |
/* */ |
| 9 |
/* you can redistribute it and/or modify it under the terms of the GNU */ |
| 10 |
/* Lesser General Public License as published by the Free Software */ |
| 11 |
/* Foundation, version 2.1. */ |
| 12 |
/* */ |
| 13 |
/* It is distributed in the hope that it will be useful, */ |
| 14 |
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ |
| 15 |
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ |
| 16 |
/* GNU Lesser General Public License for more details. */ |
| 17 |
/* */ |
| 18 |
/* See the GNU Lesser General Public License version 2.1 */ |
| 19 |
/* for more details (enclosed in the file licenses/LGPLv2.1). */ |
| 20 |
/* */ |
| 21 |
/**************************************************************************/ |
| 22 |
|
| 23 |
#ifndef __FC_GRP_H |
| 24 |
#define __FC_GRP_H |
| 25 |
#include "features.h" |
| 26 |
__PUSH_FC_STDLIB |
| 27 |
#include "__fc_define_uid_and_gid.h" |
| 28 |
#include "__fc_define_size_t.h" |
| 29 |
|
| 30 |
__BEGIN_DECLS |
| 31 |
|
| 32 |
struct group { |
| 33 |
char *gr_name; |
| 34 |
gid_t gr_gid; |
| 35 |
char **gr_mem; |
| 36 |
}; |
| 37 |
|
| 38 |
extern struct group *getgrgid(gid_t); |
| 39 |
extern struct group *getgrnam(const char *); |
| 40 |
extern int getgrgid_r(gid_t, struct group *, char *, |
| 41 |
size_t, struct group **); |
| 42 |
extern int getgrnam_r(const char *, struct group *, char *, |
| 43 |
size_t , struct group **); |
| 44 |
extern struct group *getgrent(void); |
| 45 |
extern void endgrent(void); |
| 46 |
extern void setgrent(void); |
| 47 |
|
| 48 |
/* BSD function */ |
| 49 |
extern int initgroups (const char *user, gid_t group); |
| 50 |
|
| 51 |
__END_DECLS |
| 52 |
|
| 53 |
__POP_FC_STDLIB |
| 54 |
#endif |
| 55 |
|