diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2006-10-11 15:34:15 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2006-10-11 15:34:15 +0200 |
commit | 6f17403298cf33747a45fb5ecbe78bf7632531f9 (patch) | |
tree | a5fc4cfdc3b091a0ee86f3c5c8d5e0ea8fc2c564 /tests/testd.c |
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
Diffstat (limited to 'tests/testd.c')
-rw-r--r-- | tests/testd.c | 41 |
1 files changed, 41 insertions, 0 deletions
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 <lber.h> +#import <ldap.h> +#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); +} |