From f0f87cf7faecb9899a6a04da72e13ed6c408d01b Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 10 Jul 2004 17:00:53 +0000 Subject: r1430: Although prepared for only one remote backend, make the 'idmap backend' parameter a list instead of a string. This makes idmap backend = ldap:"ldap://localhost/ ldap://fallback/" possible. Volker (This used to be commit ea718347937ec0e5640b29e0e9edf6eda2b45e34) --- source3/sam/idmap.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source3/sam/idmap.c') diff --git a/source3/sam/idmap.c b/source3/sam/idmap.c index bbb4980c76..d541776f39 100644 --- a/source3/sam/idmap.c +++ b/source3/sam/idmap.c @@ -96,7 +96,7 @@ NTSTATUS smb_register_idmap(int version, const char *name, struct idmap_methods Initialise idmap cache and a remote backend (if configured). **********************************************************************/ -BOOL idmap_init(const char *remote_backend) +BOOL idmap_init(const char **remote_backend) { if (!backends) static_init_idmap; @@ -115,8 +115,9 @@ BOOL idmap_init(const char *remote_backend) } } - if (!remote_map && remote_backend && *remote_backend != 0) { - char *rem_backend = smb_xstrdup(remote_backend); + if ((remote_map == NULL) && (remote_backend != NULL) && + (*remote_backend != NULL) && (**remote_backend != '\0')) { + char *rem_backend = smb_xstrdup(*remote_backend); fstring params = ""; char *pparams; -- cgit