Changeset 2725 in MondoRescue for branches/2.2.9/mindi-busybox/include/grp_.h
- Timestamp:
- Feb 25, 2011, 9:26:54 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mindi-busybox/include/grp_.h
r1765 r2725 16 16 License along with the GNU C Library; if not, write to the Free 17 17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 18 02111-1307 USA. */ 18 02111-1307 USA. 19 */ 20 /* 21 * POSIX Standard: 9.2.1 Group Database Access <grp.h> 22 */ 23 #ifndef BB_GRP_H 24 #define BB_GRP_H 1 19 25 20 /* 21 * POSIX Standard: 9.2.1 Group Database Access <grp.h> 26 PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN 27 28 /* This file is #included after #include <grp.h> 29 * We will use libc-defined structures, but will #define function names 30 * so that function calls are directed to bb_internal_XXX replacements 22 31 */ 23 24 #if !ENABLE_USE_BB_PWD_GRP25 26 #include <grp.h>27 28 #else29 30 #ifndef _GRP_H31 #define _GRP_H 132 33 /* The group structure. */34 struct group {35 char *gr_name; /* Group name. */36 char *gr_passwd; /* Password. */37 gid_t gr_gid; /* Group ID. */38 char **gr_mem; /* Member list. */39 };40 41 /* We don't reimplement this, just supplying prototype */42 /* The function itself is in libc */43 /* Set the group set for the current user to GROUPS (N of them). */44 extern int setgroups(size_t __n, __const gid_t *__groups);45 46 32 47 33 #define setgrent bb_internal_setgrent … … 61 47 62 48 /* All function names below should be remapped by #defines above 63 * in order to not collide with libc names. 64 * In theory it isn't necessary, but I saw weird interactions at link time. 65 * Let's play safe */ 49 * in order to not collide with libc names. */ 66 50 67 51 … … 72 56 extern void endgrent(void); 73 57 58 #ifdef UNUSED_SINCE_WE_AVOID_STATIC_BUFS 74 59 /* Read an entry from the group-file stream, opening it if necessary. */ 75 60 extern struct group *getgrent(void); … … 79 64 80 65 /* Write the given entry onto the given stream. */ 81 extern int putgrent( __const struct group *__restrict __p,66 extern int putgrent(const struct group *__restrict __p, 82 67 FILE *__restrict __f); 68 #endif 83 69 84 70 /* Search for an entry with a matching group ID. */ … … 86 72 87 73 /* Search for an entry with a matching group name. */ 88 extern struct group *getgrnam( __const char *__name);74 extern struct group *getgrnam(const char *__name); 89 75 90 76 /* Reentrant versions of some of the functions above. … … 106 92 107 93 /* Search for an entry with a matching group name. */ 108 extern int getgrnam_r( __const char *__restrict __name,94 extern int getgrnam_r(const char *__restrict __name, 109 95 struct group *__restrict __resultbuf, 110 96 char *__restrict __buffer, size_t __buflen, … … 121 107 *GROUPS. Also include GROUP. The actual number of groups found is 122 108 returned in *NGROUPS. Return -1 if the if *NGROUPS is too small. */ 123 extern int getgrouplist( __const char *__user, gid_t __group,109 extern int getgrouplist(const char *__user, gid_t __group, 124 110 gid_t *__groups, int *__ngroups); 125 111 … … 127 113 by reading the group database and using all groups 128 114 of which USER is a member. Also include GROUP. */ 129 extern int initgroups( __const char *__user, gid_t __group);115 extern int initgroups(const char *__user, gid_t __group); 130 116 117 POP_SAVED_FUNCTION_VISIBILITY 131 118 132 #endif /* grp.h */133 119 #endif
Note:
See TracChangeset
for help on using the changeset viewer.