Home
last modified time | relevance | path

Searched refs:num_groups (Results 1 – 2 of 2) sorted by relevance

/system/core/liblog/
Dlogger_write.c66 int num_groups; in check_log_uid_permissions() local
69 num_groups = getgroups(0, NULL); in check_log_uid_permissions()
70 if (num_groups <= 0) { in check_log_uid_permissions()
73 groups = calloc(num_groups, sizeof(gid_t)); in check_log_uid_permissions()
77 num_groups = getgroups(num_groups, groups); in check_log_uid_permissions()
78 while (num_groups > 0) { in check_log_uid_permissions()
79 if (groups[num_groups - 1] == AID_LOG) { in check_log_uid_permissions()
82 --num_groups; in check_log_uid_permissions()
85 if (num_groups <= 0) { in check_log_uid_permissions()
/system/core/liblog/tests/
Dliblog_test.cpp2000 int num_groups = getgroups(0, NULL); in TEST() local
2001 if (num_groups > 0) { in TEST()
2002 gid_t groups[num_groups]; in TEST()
2003 num_groups = getgroups(num_groups, groups); in TEST()
2004 while (num_groups > 0) { in TEST()
2005 if (groups[num_groups - 1] == AID_LOG) { in TEST()
2008 --num_groups; in TEST()
2011 if (num_groups <= 0) { in TEST()