vfs: check userland buffers before reading them.
[haiku.git] / headers / posix / grp.h
blobe44c15c9f6adca9f546afd5625bbf5b5883a8c12
1 /*
2 * Copyright 2004-2012 Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _GRP_H_
6 #define _GRP_H_
9 #include <sys/types.h>
12 struct group {
13 char *gr_name;
14 char *gr_passwd;
15 gid_t gr_gid;
16 char **gr_mem;
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
24 extern struct group *getgrgid(gid_t gid);
25 extern struct group *getgrnam(const char *name);
26 extern int getgrgid_r(gid_t gid, struct group *group, char *buffer,
27 size_t bufferSize, struct group **_result);
28 extern int getgrnam_r(const char *name, struct group *group, char *buffer,
29 size_t bufferSize, struct group **_result);
31 extern struct group *getgrent(void);
32 extern int getgrent_r(struct group* group, char* buffer, size_t bufferSize,
33 struct group** _result);
34 extern void setgrent(void);
35 extern void endgrent(void);
37 #ifdef __cplusplus
39 #endif
41 #endif /* _GRP_H_ */