<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Check if user belongs to weston-launch group always fails if user in wheel"
href="https://bugs.freedesktop.org/show_bug.cgi?id=99288">99288</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Check if user belongs to weston-launch group always fails if user in wheel
</td>
</tr>
<tr>
<th>Product</th>
<td>Wayland
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>FreeBSD
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>blocker
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>weston
</td>
</tr>
<tr>
<th>Assignee</th>
<td>wayland-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>johalun0@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>Problem:
<a href="https://github.com/wayland-project/weston/blob/master/libweston/weston-launch.c#L158">https://github.com/wayland-project/weston/blob/master/libweston/weston-launch.c#L158</a>
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) {
...
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>