Bug 857 - sudo ends with message "unable to set runas group vector"
sudo ends with message "unable to set runas group vector"
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.8.25
IBM AIX
: low high
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-10-25 01:16 MDT by Thomas Mielke
Modified: 2018-11-16 11:14 MST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Mielke 2018-10-25 01:16:32 MDT
On AIX sudo gives always the message "unable to set runas group vector".
As a result sudo is not switching to the effective user and group.

The bug is identified in source code "lib/util/getgrouplist.c" line 141: grset++;

The code is first retrieving all supplemental groups of a user with "grset = getgrset (name). After that grset is a char string i.e. "202,1". With buggy grset++ grset is than pointing to "02,1", interpreting 02 as the first supplemental Group id, which is wrong!

Easy solution is to remove line 141 "grset++;" completely!
Comment 1 Todd C. Miller 2018-10-25 07:21:51 MDT
Thanks for debugging this.  I've committed the fix:
https://www.sudo.ws/repos/sudo/rev/03b19227cab2
Comment 2 Todd C. Miller 2018-11-16 11:14:39 MST
Fixed in sudo 1.8.26.