[opensuse-factory] snapper fails to accept group in ALLOW_GROUPS
When I try to add a group to ALLOW_GROUPS in a snapper config file I get an "invalid group" error. The issue was tracked down to getgrnam_r(): In snapper-0.3.3/snapper/AppUtil.cc get_group_gid() fails to lockup the GID when bufsize (typically 1024) is too small. I have quite a number of users in a group in /etc/group. The the buffer size is not sufficient getgrnam_r() will fail with an ERANGE error. Increasing bufsize from 1024 to 2000 seems to work and obviously removing some of the users from the group helps too. I recommend to do something like described in http://pubs.opengroup.org/onlinepubs/9699919799/functions/getgrnam.html This will ensure enough space is made available. However, I am not sure if this issue is fully fixed by a change to snapper. It seems that the order of the groups AND the number of members in the group file matters too. If getgrname_r runs across an entry with too many members any subsequent entry is answered with an ERANGE error. So even if the group that is added to ALLOW_GROUPS does not have that many users but is listed after one that does the error would still occur. I don't think working around this with MAX_MEMBERS_PER_GROUP in /etc/login.defs is any better. Note: This report was first sent to "yast-devel" as suggested on the Snapper IO page. This list however seems more appropriate for discussion. -- Holger Jakob -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (1)
-
Holger Jakob