NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lib/48859: getnetgrent(3) doesn't work with 3rd party NSS modules
>Number: 48859
>Category: lib
>Synopsis: getnetgrent(3) doesn't work with 3rd party NSS modules
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat May 31 17:20:00 +0000 2014
>Originator: tron%zhadum.org.uk@localhost
>Release: NetBSD 6.99.43 (2014-05-28 HEAD sources)
>Organization:
Matthias Scheler https://zhadum.org.uk/
>Environment:
System: NetBSD lyssa.zhadum.org.uk 6.99.43 NetBSD 6.99.43 (GENERIC) #0: Wed May
28 21:59:52 BST 2014
tron%lyssa.zhadum.org.uk@localhost:/src/sys/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
NetBSD's libc fails to use the netgroup backend implemented by 3rd party
NSS modules which were written for Solaris or Linux.
>How-To-Repeat:
1.) Install "pkgsrc/databases/nss_ldap" and configure it appropriately.
2.) Configure "netgroup" lookups via LDAP in "/etc/nsswitch.conf"
e.g. with a line like this:
netgroup: files ldap
3.) Try to look-up a netgroup with "getent netgroup <name>".
"getent" will *not* print out the netgroup. It will in fact not even
communicate with the LDAP server to get information about the netgroup.
The problem is that our "libc" looks for a symbol called
"_nss_<module>_getnetgrent". But modules written for Linux or Solaris
only provide "_nss_<module>_getnetgrent_r".
>Fix:
We should probably implement getnetgrent_r(3) which dispatches to NSS.
Here is the signature from the Linux manual page ...
int getnetgrent_r(char **host, char **user,
char **domain, char *buf, int buflen);
... and from the Solaris manual page:
int getnetgrent_r(char **machinep, char **userp, char
**domainp, char *buffer, int buflen);
The existing function getnetgrent(3) should be implemented via
getnetgrent_r(3).
Home |
Main Index |
Thread Index |
Old Index