summaryrefslogtreecommitdiff
path: root/source3/sam/idmap.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-06-06 13:48:39 +0000
committerGerald Carter <jerry@samba.org>2003-06-06 13:48:39 +0000
commit711f8d0a13c6854f8c552a9561571d26fa5e9884 (patch)
tree1b1f4a6fac98c249f8085e3cac15ae8beb9c3341 /source3/sam/idmap.c
parent53f8d3f01aed0118bafa36c8eabfc558e29f91dd (diff)
downloadsamba-711f8d0a13c6854f8c552a9561571d26fa5e9884.tar.gz
samba-711f8d0a13c6854f8c552a9561571d26fa5e9884.tar.bz2
samba-711f8d0a13c6854f8c552a9561571d26fa5e9884.zip
* break out more common code used between pdb_ldap and idmap_ldap
* remove 'winbind uid' and 'winbind gid' parameters (replaced by current idmap parameter) * create the sambaUnixIdPool entries automatically in the 'ldap idmap suffix' * add new 'ldap idmap suffix' and 'ldap group suffix' parametrer * "idmap backend = ldap" now accepts 'ldap:ldap://server/' format (parameters are passed to idmap init() function (This used to be commit 1665926281ed2be3c5affca551c9d458d013fc7f)
Diffstat (limited to 'source3/sam/idmap.c')
-rw-r--r--source3/sam/idmap.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/source3/sam/idmap.c b/source3/sam/idmap.c
index 62377a9228..d031c49e25 100644
--- a/source3/sam/idmap.c
+++ b/source3/sam/idmap.c
@@ -105,19 +105,30 @@ BOOL idmap_init(void)
return False;
}
- if (NT_STATUS_IS_ERR(local_map->init())) {
+ if (NT_STATUS_IS_ERR(local_map->init( NULL ))) {
DEBUG(0, ("idmap_init: could not load or create local backend!\n"));
return False;
}
}
if (!remote_map && remote_backend && *remote_backend != 0) {
+ fstring params = "";
+ char *pparams;
+
+ /* get any mode parameters passed in */
+
+ if ( (pparams = strchr( remote_backend, ':' )) != NULL ) {
+ pparams = '\0';
+ pparams++;
+ fstrcpy( params, pparams );
+ }
+
DEBUG(3, ("idmap_init: using '%s' as remote backend\n", remote_backend));
if((remote_map = get_methods(remote_backend)) ||
(NT_STATUS_IS_OK(smb_probe_module("idmap", remote_backend)) &&
(remote_map = get_methods(remote_backend)))) {
- remote_map->init();
+ remote_map->init(params);
} else {
DEBUG(0, ("idmap_init: could not load remote backend '%s'\n", remote_backend));
return False;