aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2024-10-07 06:36:00 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2024-10-07 06:36:00 +0200
commit4c1d645c86f4e7a380d96f9ba962f8b270f595dc (patch)
tree365585f77fc146545119c17250eff32a61f2718c /include
parent860b3d066f6aaa12dfa0cd2351559e05288cf9b5 (diff)
downloadbusybox-w32-4c1d645c86f4e7a380d96f9ba962f8b270f595dc.tar.gz
busybox-w32-4c1d645c86f4e7a380d96f9ba962f8b270f595dc.tar.bz2
busybox-w32-4c1d645c86f4e7a380d96f9ba962f8b270f595dc.zip
libbb: simplify parameter passing in is_in_supplementary_groups()
function old new delta is_in_supplementary_groups 54 52 -2 nexpr 721 718 -3 test_exec 125 119 -6 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-11) Total: -11 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/libbb.h b/include/libbb.h
index e06aef08e..99bbf623b 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1203,9 +1203,15 @@ void die_if_bad_username(const char* name) FAST_FUNC;
1203gid_t *bb_getgroups(int *ngroups, gid_t *group_array) FAST_FUNC; 1203gid_t *bb_getgroups(int *ngroups, gid_t *group_array) FAST_FUNC;
1204/* 1204/*
1205 * True if GID is in our getgroups() result. 1205 * True if GID is in our getgroups() result.
1206 * getgroups() is cached in group_array[], to makse successive calls faster. 1206 * getgroups() is cached in supplementary_array[], to make successive calls faster.
1207 */ 1207 */
1208int FAST_FUNC is_in_supplementary_groups(int *pngroups, gid_t **pgroup_array, gid_t gid); 1208struct cached_groupinfo {
1209 //TODO? gid_t egid;
1210 int ngroups;
1211 gid_t *supplementary_array;
1212};
1213//TODO? int FAST_FUNC get_cached_egid(gid_t *egid);
1214int FAST_FUNC is_in_supplementary_groups(struct cached_groupinfo *groupinfo, gid_t gid);
1209 1215
1210#if ENABLE_FEATURE_UTMP 1216#if ENABLE_FEATURE_UTMP
1211void FAST_FUNC write_new_utmp(pid_t pid, int new_type, const char *tty_name, const char *username, const char *hostname); 1217void FAST_FUNC write_new_utmp(pid_t pid, int new_type, const char *tty_name, const char *username, const char *hostname);