1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00

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 commit is contained in:
Volker Lendecke 2004-07-10 17:00:53 +00:00 committed by Gerald (Jerry) Carter
parent 54248a405c
commit ea71834793
2 changed files with 7 additions and 6 deletions

View File

@ -176,7 +176,7 @@ typedef struct
BOOL bWinbindTrustedDomainsOnly;
BOOL bWinbindNestedGroups;
char *szWinbindBackend;
char *szIdmapBackend;
char **szIdmapBackend;
char *szAddShareCommand;
char *szChangeShareCommand;
char *szDeleteShareCommand;
@ -1165,7 +1165,7 @@ static struct parm_struct parm_table[] = {
{N_("Winbind options"), P_SEP, P_SEPARATOR},
{"enable rid algorithm", P_BOOL, P_GLOBAL, &Globals.bEnableRidAlgorithm, NULL, NULL, FLAG_DEPRECATED},
{"idmap backend", P_STRING, P_GLOBAL, &Globals.szIdmapBackend, NULL, NULL, FLAG_ADVANCED},
{"idmap backend", P_LIST, P_GLOBAL, &Globals.szIdmapBackend, NULL, NULL, FLAG_ADVANCED},
{"idmap uid", P_STRING, P_GLOBAL, &Globals.szIdmapUID, handle_idmap_uid, NULL, FLAG_ADVANCED},
{"winbind uid", P_STRING, P_GLOBAL, &Globals.szIdmapUID, handle_idmap_uid, NULL, FLAG_HIDE},
{"idmap gid", P_STRING, P_GLOBAL, &Globals.szIdmapGID, handle_idmap_gid, NULL, FLAG_ADVANCED},
@ -1710,7 +1710,7 @@ FN_GLOBAL_BOOL(lp_winbind_use_default_domain, &Globals.bWinbindUseDefaultDomain)
FN_GLOBAL_BOOL(lp_winbind_trusted_domains_only, &Globals.bWinbindTrustedDomainsOnly)
FN_GLOBAL_BOOL(lp_winbind_nested_groups, &Globals.bWinbindNestedGroups)
FN_GLOBAL_STRING(lp_idmap_backend, &Globals.szIdmapBackend)
FN_GLOBAL_LIST(lp_idmap_backend, &Globals.szIdmapBackend)
FN_GLOBAL_BOOL(lp_enable_rid_algorithm, &Globals.bEnableRidAlgorithm)
#ifdef WITH_LDAP_SAMCONFIG

View File

@ -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;