aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2024-10-08 10:22:27 +0100
committerRon Yorston <rmy@pobox.com>2024-10-08 10:22:27 +0100
commit054f494916093715bc1d2d25a7a452a036d41add (patch)
treebc39de6ed29bc998867f095a26b9de7b0f8c3dfc /include
parent2fe27c6dbf3c752edbfddfd48c15bab55b3ab8de (diff)
downloadbusybox-w32-054f494916093715bc1d2d25a7a452a036d41add.tar.gz
busybox-w32-054f494916093715bc1d2d25a7a452a036d41add.tar.bz2
busybox-w32-054f494916093715bc1d2d25a7a452a036d41add.zip
libbb: code shrink supplementary group test
Recent upstream changes to file permission tests added a function to check and cache values in the supplementary group list. The implementation of getgroups() in the Windows port adds no useful information beyond what can be obtained by checking the current effective gid, which all callers of the new function already do. The function can be replaced with a simple 'FALSE'. Saves 232-288 bytes.
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h
index ff4a67481..11d52c08c 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1273,7 +1273,11 @@ struct cached_groupinfo {
1273}; 1273};
1274uid_t FAST_FUNC get_cached_euid(uid_t *euid); 1274uid_t FAST_FUNC get_cached_euid(uid_t *euid);
1275gid_t FAST_FUNC get_cached_egid(gid_t *egid); 1275gid_t FAST_FUNC get_cached_egid(gid_t *egid);
1276#if !ENABLE_PLATFORM_MINGW32
1276int FAST_FUNC is_in_supplementary_groups(struct cached_groupinfo *groupinfo, gid_t gid); 1277int FAST_FUNC is_in_supplementary_groups(struct cached_groupinfo *groupinfo, gid_t gid);
1278#else
1279# define is_in_supplementary_groups(g, i) (FALSE)
1280#endif
1277 1281
1278#if ENABLE_FEATURE_UTMP 1282#if ENABLE_FEATURE_UTMP
1279void FAST_FUNC write_new_utmp(pid_t pid, int new_type, const char *tty_name, const char *username, const char *hostname); 1283void FAST_FUNC write_new_utmp(pid_t pid, int new_type, const char *tty_name, const char *username, const char *hostname);