blob: f47081af800cfedd8ef73c489e6b64c7579d060d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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);
}
|