Android: Allow setgroups to be overridden from build configuration

ANDROID_SETGROUPS_OVERRIDE macro can now be used to override setgroups()
values based on build configuration.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Deepthi Gowri 2013-02-07 00:36:16 +02:00 committed by Jouni Malinen
parent c002f6405f
commit 83e7aedf72

View file

@ -257,7 +257,11 @@ int os_program_init(void)
* We ignore errors here since errors are normal if we * We ignore errors here since errors are normal if we
* are already running as non-root. * are already running as non-root.
*/ */
#ifdef ANDROID_SETGROUPS_OVERRIDE
gid_t groups[] = { ANDROID_SETGROUPS_OVERRIDE };
#else /* ANDROID_SETGROUPS_OVERRIDE */
gid_t groups[] = { AID_INET, AID_WIFI, AID_KEYSTORE }; gid_t groups[] = { AID_INET, AID_WIFI, AID_KEYSTORE };
#endif /* ANDROID_SETGROUPS_OVERRIDE */
struct __user_cap_header_struct header; struct __user_cap_header_struct header;
struct __user_cap_data_struct cap; struct __user_cap_data_struct cap;