Check if user belongs to weston-launch group always fails if user in wheel
Submitted by Johannes Lundberg
Assigned to Wayland bug list
Description
Problem: https://github.com/wayland-project/weston/blob/master/libweston/weston-launch.c#L158 This will exit early if user belongs to wheel group (id=0) it is listed before weston-launch in the list of groups.
Solution: Get number of groups (=n) and iterate from 0 to n-1.
n = getgroups(0, NULL); for (i = 0; i<n; ++i) { ... }