diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/grp_.h | 54 | ||||
-rw-r--r-- | include/pwd_.h | 25 |
2 files changed, 1 insertions, 78 deletions
diff --git a/include/grp_.h b/include/grp_.h index e5075e5a0..f7b8d836f 100644 --- a/include/grp_.h +++ b/include/grp_.h | |||
@@ -30,17 +30,9 @@ PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN | |||
30 | * so that function calls are directed to bb_internal_XXX replacements | 30 | * so that function calls are directed to bb_internal_XXX replacements |
31 | */ | 31 | */ |
32 | #undef endgrent | 32 | #undef endgrent |
33 | #define setgrent bb_internal_setgrent | ||
34 | #define endgrent bb_internal_endgrent | 33 | #define endgrent bb_internal_endgrent |
35 | #define getgrent bb_internal_getgrent | ||
36 | #define fgetgrent bb_internal_fgetgrent | ||
37 | #define putgrent bb_internal_putgrent | ||
38 | #define getgrgid bb_internal_getgrgid | 34 | #define getgrgid bb_internal_getgrgid |
39 | #define getgrnam bb_internal_getgrnam | 35 | #define getgrnam bb_internal_getgrnam |
40 | #define getgrent_r bb_internal_getgrent_r | ||
41 | #define getgrgid_r bb_internal_getgrgid_r | ||
42 | #define getgrnam_r bb_internal_getgrnam_r | ||
43 | #define fgetgrent_r bb_internal_fgetgrent_r | ||
44 | #define getgrouplist bb_internal_getgrouplist | 36 | #define getgrouplist bb_internal_getgrouplist |
45 | #define initgroups bb_internal_initgroups | 37 | #define initgroups bb_internal_initgroups |
46 | 38 | ||
@@ -48,60 +40,16 @@ PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN | |||
48 | /* All function names below should be remapped by #defines above | 40 | /* All function names below should be remapped by #defines above |
49 | * in order to not collide with libc names. */ | 41 | * in order to not collide with libc names. */ |
50 | 42 | ||
51 | |||
52 | /* Rewind the group-file stream. */ | ||
53 | extern void setgrent(void); | ||
54 | |||
55 | /* Close the group-file stream. */ | 43 | /* Close the group-file stream. */ |
56 | extern void endgrent(void); | 44 | extern void endgrent(void); |
57 | 45 | ||
58 | #ifdef UNUSED_SINCE_WE_AVOID_STATIC_BUFS | ||
59 | /* Read an entry from the group-file stream, opening it if necessary. */ | ||
60 | extern struct group *getgrent(void); | ||
61 | |||
62 | /* Read a group entry from STREAM. */ | ||
63 | extern struct group *fgetgrent(FILE *__stream); | ||
64 | |||
65 | /* Write the given entry onto the given stream. */ | ||
66 | extern int putgrent(const struct group *__restrict __p, | ||
67 | FILE *__restrict __f); | ||
68 | #endif | ||
69 | |||
70 | /* Search for an entry with a matching group ID. */ | 46 | /* Search for an entry with a matching group ID. */ |
71 | extern struct group *getgrgid(gid_t __gid); | 47 | extern struct group *getgrgid(gid_t __gid); |
72 | 48 | ||
73 | /* Search for an entry with a matching group name. */ | 49 | /* Search for an entry with a matching group name. */ |
74 | extern struct group *getgrnam(const char *__name); | 50 | extern struct group *getgrnam(const char *__name); |
75 | 51 | ||
76 | /* Reentrant versions of some of the functions above. | 52 | /* Reentrant versions of some of the functions above. */ |
77 | |||
78 | PLEASE NOTE: the `getgrent_r' function is not (yet) standardized. | ||
79 | The interface may change in later versions of this library. But | ||
80 | the interface is designed following the principals used for the | ||
81 | other reentrant functions so the chances are good this is what the | ||
82 | POSIX people would choose. */ | ||
83 | |||
84 | extern int getgrent_r(struct group *__restrict __resultbuf, | ||
85 | char *__restrict __buffer, size_t __buflen, | ||
86 | struct group **__restrict __result); | ||
87 | |||
88 | /* Search for an entry with a matching group ID. */ | ||
89 | extern int getgrgid_r(gid_t __gid, struct group *__restrict __resultbuf, | ||
90 | char *__restrict __buffer, size_t __buflen, | ||
91 | struct group **__restrict __result); | ||
92 | |||
93 | /* Search for an entry with a matching group name. */ | ||
94 | extern int getgrnam_r(const char *__restrict __name, | ||
95 | struct group *__restrict __resultbuf, | ||
96 | char *__restrict __buffer, size_t __buflen, | ||
97 | struct group **__restrict __result); | ||
98 | |||
99 | /* Read a group entry from STREAM. This function is not standardized | ||
100 | an probably never will. */ | ||
101 | extern int fgetgrent_r(FILE *__restrict __stream, | ||
102 | struct group *__restrict __resultbuf, | ||
103 | char *__restrict __buffer, size_t __buflen, | ||
104 | struct group **__restrict __result); | ||
105 | 53 | ||
106 | /* Store at most *NGROUPS members of the group set for USER into | 54 | /* Store at most *NGROUPS members of the group set for USER into |
107 | *GROUPS. Also include GROUP. The actual number of groups found is | 55 | *GROUPS. Also include GROUP. The actual number of groups found is |
diff --git a/include/pwd_.h b/include/pwd_.h index 625b6f5a2..d086f86e3 100644 --- a/include/pwd_.h +++ b/include/pwd_.h | |||
@@ -34,20 +34,14 @@ PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN | |||
34 | #define setpwent bb_internal_setpwent | 34 | #define setpwent bb_internal_setpwent |
35 | #define endpwent bb_internal_endpwent | 35 | #define endpwent bb_internal_endpwent |
36 | #define getpwent bb_internal_getpwent | 36 | #define getpwent bb_internal_getpwent |
37 | #define fgetpwent bb_internal_fgetpwent | ||
38 | #define putpwent bb_internal_putpwent | ||
39 | #define getpwuid bb_internal_getpwuid | 37 | #define getpwuid bb_internal_getpwuid |
40 | #define getpwnam bb_internal_getpwnam | 38 | #define getpwnam bb_internal_getpwnam |
41 | #define getpwent_r bb_internal_getpwent_r | 39 | #define getpwent_r bb_internal_getpwent_r |
42 | #define getpwuid_r bb_internal_getpwuid_r | ||
43 | #define getpwnam_r bb_internal_getpwnam_r | 40 | #define getpwnam_r bb_internal_getpwnam_r |
44 | #define fgetpwent_r bb_internal_fgetpwent_r | ||
45 | |||
46 | 41 | ||
47 | /* All function names below should be remapped by #defines above | 42 | /* All function names below should be remapped by #defines above |
48 | * in order to not collide with libc names. */ | 43 | * in order to not collide with libc names. */ |
49 | 44 | ||
50 | |||
51 | /* Rewind the password-file stream. */ | 45 | /* Rewind the password-file stream. */ |
52 | extern void setpwent(void); | 46 | extern void setpwent(void); |
53 | 47 | ||
@@ -57,13 +51,6 @@ extern void endpwent(void); | |||
57 | #ifdef UNUSED_SINCE_WE_AVOID_STATIC_BUFS | 51 | #ifdef UNUSED_SINCE_WE_AVOID_STATIC_BUFS |
58 | /* Read an entry from the password-file stream, opening it if necessary. */ | 52 | /* Read an entry from the password-file stream, opening it if necessary. */ |
59 | extern struct passwd *getpwent(void); | 53 | extern struct passwd *getpwent(void); |
60 | |||
61 | /* Read an entry from STREAM. */ | ||
62 | extern struct passwd *fgetpwent(FILE *__stream); | ||
63 | |||
64 | /* Write the given entry onto the given stream. */ | ||
65 | extern int putpwent(const struct passwd *__restrict __p, | ||
66 | FILE *__restrict __f); | ||
67 | #endif | 54 | #endif |
68 | 55 | ||
69 | /* Search for an entry with a matching user ID. */ | 56 | /* Search for an entry with a matching user ID. */ |
@@ -84,23 +71,11 @@ extern int getpwent_r(struct passwd *__restrict __resultbuf, | |||
84 | char *__restrict __buffer, size_t __buflen, | 71 | char *__restrict __buffer, size_t __buflen, |
85 | struct passwd **__restrict __result); | 72 | struct passwd **__restrict __result); |
86 | 73 | ||
87 | extern int getpwuid_r(uid_t __uid, | ||
88 | struct passwd *__restrict __resultbuf, | ||
89 | char *__restrict __buffer, size_t __buflen, | ||
90 | struct passwd **__restrict __result); | ||
91 | |||
92 | extern int getpwnam_r(const char *__restrict __name, | 74 | extern int getpwnam_r(const char *__restrict __name, |
93 | struct passwd *__restrict __resultbuf, | 75 | struct passwd *__restrict __resultbuf, |
94 | char *__restrict __buffer, size_t __buflen, | 76 | char *__restrict __buffer, size_t __buflen, |
95 | struct passwd **__restrict __result); | 77 | struct passwd **__restrict __result); |
96 | 78 | ||
97 | /* Read an entry from STREAM. This function is not standardized and | ||
98 | probably never will. */ | ||
99 | extern int fgetpwent_r(FILE *__restrict __stream, | ||
100 | struct passwd *__restrict __resultbuf, | ||
101 | char *__restrict __buffer, size_t __buflen, | ||
102 | struct passwd **__restrict __result); | ||
103 | |||
104 | POP_SAVED_FUNCTION_VISIBILITY | 79 | POP_SAVED_FUNCTION_VISIBILITY |
105 | 80 | ||
106 | #endif | 81 | #endif |