diff options
-rw-r--r-- | source3/param/loadparm.c | 6 | ||||
-rw-r--r-- | source3/sam/idmap.c | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 0785c2501b..a309fde007 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -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 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; |