From 6f17403298cf33747a45fb5ecbe78bf7632531f9 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Wed, 11 Oct 2006 13:34:15 +0000 Subject: import release 251 of nss-ldap git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss_ldap-251@1 ef36b2f9-881f-0410-afb5-c4e39611909c --- tests/testd.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 tests/testd.c (limited to 'tests/testd.c') diff --git a/tests/testd.c b/tests/testd.c new file mode 100644 index 0000000..f47081a --- /dev/null +++ b/tests/testd.c @@ -0,0 +1,41 @@ + +#import +#import +#import "ldap-nss.h" +#import "util.h" +#import "dnsconfig.h" + +void +printcf (ldap_config_t * cf) +{ + printf ("host %s\n", cf->ldc_host); + printf ("port %d\n", cf->ldc_port); + printf ("base %s\n", cf->ldc_base); +#if 0 + char *ldc_host; + int ldc_port; + char *ldc_base; + int ldc_scope; + char *ldc_binddn; + char *ldc_bindpw; + struct ldap_config *ldc_next; +#endif +} + +void +main (void) +{ +/* + NSS_STATUS _nss_ldap_readconfigfromdns( + ldap_config_t *result, + char *buf, + size_t buflen + */ + ldap_config_t cf; + char buf[1024]; + + _nss_ldap_readconfigfromdns (&cf, buf, sizeof (buf)); + printcf (&cf); + printcf (cf.ldc_next); + exit (0); +} -- cgit v1.2.3