Bug 99288 - Check if user belongs to weston-launch group always fails if user in wheel
Summary: Check if user belongs to weston-launch group always fails if user in wheel
Status: RESOLVED MOVED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: Other FreeBSD
: medium blocker
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-05 18:16 UTC by Johannes Lundberg
Modified: 2018-06-08 23:55 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Johannes Lundberg 2017-01-05 18:16:52 UTC
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) {
    ...
}
Comment 1 GitLab Migration User 2018-06-08 23:55:09 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/wayland/weston/issues/86.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.