epics-base / pvAccessCPP

pvAccessCPP is an EPICS V4 C++ module
https://epics-base.github.io/pvAccessCPP/
Other
10 stars 22 forks source link

Assertion failure in getgroups.cpp when running as root #153

Closed mdavidsaver closed 4 years ago

mdavidsaver commented 5 years ago

@georgweiss Reports a failure when running as root.

https://github.com/epics-base/pvAccessCPP/blob/24e83daaba1c7b3618b355b4f4dc37ab79414a74/src/utils/getgroups.cpp#L117

This assert was intended to catch a hypothetical case where getgrouplist() didn't actually update the gtemp vector. The default value is 0, so an error here would erroneously report membership in group zero (aka. group 'root'). However, I clearly didn't think the whole process through.

mdavidsaver commented 5 years ago

Fixed by b24afb9d3389760c4762abbc5b1d4e184af2aa2b