The Samba-Bugzilla – Attachment 2372 Details for
Bug 4501
winbind: ERROR: Could not get methods for backend ad
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
new patch which also fixes the idmap_init() failure when no alloc backend has been specified
look (text/plain), 2.77 KB, created by
Gerald (Jerry) Carter (dead mail address)
on 2007-04-10 17:56:33 UTC
(
hide
)
Description:
new patch which also fixes the idmap_init() failure when no alloc backend has been specified
Filename:
MIME Type:
Creator:
Gerald (Jerry) Carter (dead mail address)
Created:
2007-04-10 17:56:33 UTC
Size:
2.77 KB
patch
obsolete
>diff -uBbrN --exclude-from=./diff.excludes samba-3.0.25rc1/source/nsswitch/idmap_ad.c samba-3.0.25rc1.patched/source/nsswitch/idmap_ad.c >--- samba-3.0.25rc1/source/nsswitch/idmap_ad.c 2007-04-09 12:30:57.000000000 -0500 >+++ samba-3.0.25rc1.patched/source/nsswitch/idmap_ad.c 2007-04-10 15:38:30.000000000 -0500 >@@ -164,14 +164,10 @@ > { > struct idmap_ad_context *ctx; > char *config_option; >- const char *range; >+ const char *range = NULL; >+ const char *schema_mode = NULL; > ADS_STRUCT *ads; > >- /* verify AD is reachable (not critical, we may just be offline at start) */ >- if ( (ads = ad_idmap_cached_connection()) == NULL ) { >- DEBUG(1, ("WARNING: Could not init an AD connection! Mapping might not work.\n")); >- } >- > if ( (ctx = talloc_zero(dom, struct idmap_ad_context)) == NULL ) { > DEBUG(0, ("Out of memory!\n")); > return NT_STATUS_NO_MEMORY; >@@ -194,6 +190,20 @@ > } > } > >+ /* schema mode */ >+ if ( ad_map_type == WB_POSIX_MAP_UNKNOWN ) >+ ad_map_type = WB_POSIX_MAP_RFC2307; >+ schema_mode = lp_parm_const_string(-1, config_option, "schema_mode", NULL); >+ if ( schema_mode && schema_mode[0] ) { >+ if ( strequal(schema_mode, "sfu") ) >+ ad_map_type = WB_POSIX_MAP_SFU; >+ else if ( strequal(schema_mode, "rfc2307" ) ) >+ ad_map_type = WB_POSIX_MAP_RFC2307; >+ else >+ DEBUG(0,("idmap_ad_initialize: Unknown schema_mode (%s)\n", >+ schema_mode)); >+ } >+ > dom->private_data = ctx; > > talloc_free(config_option); >diff -uBbrN --exclude-from=./diff.excludes samba-3.0.25rc1/source/nsswitch/idmap.c samba-3.0.25rc1.patched/source/nsswitch/idmap.c >--- samba-3.0.25rc1/source/nsswitch/idmap.c 2007-04-09 12:30:57.000000000 -0500 >+++ samba-3.0.25rc1.patched/source/nsswitch/idmap.c 2007-04-10 17:48:26.000000000 -0500 >@@ -259,7 +259,7 @@ > char *compat_backend = NULL; > char *compat_params = NULL; > const char **dom_list = NULL; >- char *alloc_backend; >+ char *alloc_backend = NULL; > BOOL default_already_defined = False; > BOOL pri_dom_is_in_list = False; > int compat = 0; >@@ -561,11 +561,11 @@ > } > > >- /*************************** >- * initialize alloc module >- */ >- DEBUG(1, ("Initializing idmap alloc module\n")); >+ /* Initialize alloc module */ >+ >+ DEBUG(3, ("Initializing idmap alloc module\n")); > >+ alloc_backend = NULL; > if (compat) { > alloc_backend = talloc_strdup(idmap_ctx, compat_backend); > } else { >@@ -573,11 +573,10 @@ > > if (ab && (ab[0] != '\0')) { > alloc_backend = talloc_strdup(idmap_ctx, lp_idmap_alloc_backend()); >- } else { >- alloc_backend = talloc_strdup(idmap_ctx, "tdb"); > } > } >- IDMAP_CHECK_ALLOC(alloc_backend); >+ >+ if ( alloc_backend ) { > > alloc_methods = get_alloc_methods(alloc_backends, alloc_backend); > if ( ! alloc_methods) { >@@ -603,6 +602,7 @@ > else > ret = NT_STATUS_UNSUCCESSFUL; > } >+ } > > /* cleanpu temporary strings */ > TALLOC_FREE( compat_backend );
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 4501
:
2364
|
2365
|
2366
|
2367
|
2368
|
2372
|
2373
|
2375
|
2377
|
2378
|
2379
|
2380
|
2399
|
2413
|
2414
|
2565
|
2566
|
2691
|
2788
|
2789
|
2790
|
2793
|
2795