diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-04-16 09:41:10 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-04-16 09:41:10 +0000 |
commit | f9cde25fa492e071960e0857f5075222119a0d1c (patch) | |
tree | 17cdfca63418963ca750a4a8c4a222dee986bfa7 /source3 | |
parent | ef41d0d951cd81d92d6e0e3530339cd2e0a1bb6c (diff) | |
download | samba-f9cde25fa492e071960e0857f5075222119a0d1c.tar.gz samba-f9cde25fa492e071960e0857f5075222119a0d1c.tar.bz2 samba-f9cde25fa492e071960e0857f5075222119a0d1c.zip |
Make this code actually compile (--with-ldapsam).
This might not actually be the 'right way' to do this, but it's better to
have it compile...
Andrew Bartlett
(This used to be commit c7dc0b27aca8f7e4653b25dae37ea38d68fc045a)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/nsswitch/winbindd_idmap_ldap.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/nsswitch/winbindd_idmap_ldap.c b/source3/nsswitch/winbindd_idmap_ldap.c index eb10dd33e9..55efb7f45c 100644 --- a/source3/nsswitch/winbindd_idmap_ldap.c +++ b/source3/nsswitch/winbindd_idmap_ldap.c @@ -100,15 +100,18 @@ static BOOL ldap_idmap_init(void) #ifdef WITH_LDAP_SAMCONFIG { int ldap_port = lp_ldap_port(); - + char *uri; /* remap default port if not using SSL */ if (lp_ldap_ssl() != LDAP_SSL_ON && ldap_port == 636) { ldap_port = 389; } + + uri = NULL; - ldap_state->uri = asprintf("%s://%s:d", - lp_ldap_ssl() == LDAP_SSL_ON ? "ldaps" : "ldap", - lp_ldap_server(), ldap_port); + asprintf(&uri, "%s://%s:%d", + lp_ldap_ssl() == LDAP_SSL_ON ? "ldaps" : "ldap", + lp_ldap_server(), ldap_port); + ldap_state->uri = uri; if (!ldap_state->uri) { DEBUG(0,("Out of memory\n")); return False; |