innetgr Variable Behavior with Case Sensitivity

Johnathan Smith 1johnathan.smith@gmail.com
Wed Mar 18 22:35:16 GMT 2020


Hello,

In the netgroup netgr_123, the hostname is in uppercase. One triple
resembles this: (HOST1,,).
When calling:
innetgr(netgr_123, host1, NULL, NULL)

On some hosts, it returns 1. On other hosts, it returns 0.

The netgroup is stored in LDAP and retrieved through SSSD (NSS points to
sss for netgroups). I can use the genent command to view the netgroup on
all hosts and see the triple with the uppercase hostname.

Host info (same for all hosts):
RHEL 7.2
libc 2.17

Ideally the behavior would be the same across all hosts. Is there anything
I can check or change settings to enforce consistent behavior across hosts?

Additionally, inet/getnetgrent_r.c seems to show that strcasecmp is used
which would result in a match despite the case. Am I looking in the correct
place here?


Thanks in advance for any help,
John


More information about the Libc-help mailing list