summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2007-04-10 22:59:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:18 -0500
commit330985ebb5a6933bb419d7720c9d1f7d088e4a82 (patch)
tree1cf272261b8c384167bb5101f7f3a9beb1f74eec /source3
parent43401cf93baef04b5f8aaa8e6fec8ee49af61ffa (diff)
downloadsamba-330985ebb5a6933bb419d7720c9d1f7d088e4a82.tar.gz
samba-330985ebb5a6933bb419d7720c9d1f7d088e4a82.tar.bz2
samba-330985ebb5a6933bb419d7720c9d1f7d088e4a82.zip
r22159: BUG 4501 (second half of fix): Just disable the
uid/gid allocation if no idmap alloca backend has been defined and we are not using a 3.0.24 idmap backend compatible configuration. (This used to be commit 0b700456f45d2bdfe8538bcfd0fce8ec2b9c3adb)
Diffstat (limited to 'source3')
-rw-r--r--source3/nsswitch/idmap.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/nsswitch/idmap.c b/source3/nsswitch/idmap.c
index 1bd93affac..c68d69dfb2 100644
--- a/source3/nsswitch/idmap.c
+++ b/source3/nsswitch/idmap.c
@@ -259,7 +259,7 @@ NTSTATUS idmap_init(void)
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 @@ NTSTATUS idmap_init(void)
}
- /***************************
- * 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 @@ NTSTATUS idmap_init(void)
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 @@ NTSTATUS idmap_init(void)
else
ret = NT_STATUS_UNSUCCESSFUL;
}
+ }
/* cleanpu temporary strings */
TALLOC_FREE( compat_backend );