From: Rocky Bernstein Date: 2010-09-08T00:47:09+09:00 Subject: [ruby-core:32106] [Ruby 1.9-Bug#3683] getgrnam on computer with NIS group (+)? Issue #3683 has been updated by Rocky Bernstein. I ran the following program to show group information in C on the computer where the test was failing: #include #include #include #include int main(int argc, const char *argv[]) { struct group *grp; errno = 0; while (grp = getgrent()) { printf("name: %s, passwd: %s, errno %d\n", grp->gr_name, grp->gr_passwd, errno); errno = 0; } } The output shows: name: root, passwd: x, errno 0 ... name: snmp, passwd: x, errno 0 name: +, passwd: , errno 0 My /etc/group file root:x:0: ... snmp:x:139: +::: So getgrent() reports "+" as a group name; "+" is at the end of the /etc/group file. However it isn't the name of a group. Instead, "+" indicates including NIS groups. See for example section 3. http://lyre.mit.edu/~powell/debian-howto/nis.html So getgrnam() returns 0 and errno shows no indication of an error (that is, errno is 0). ---------------------------------------- http://redmine.ruby-lang.org/issues/show/3683 ---------------------------------------- http://redmine.ruby-lang.org