mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
groupdb: readd groupdb:backend parametric option
This revertsc5adb92c02
. The reason is that ldb doesn't work for cluster setups yet. metze (This used to be commit5f5d90ef76
)
This commit is contained in:
parent
e21b283d67
commit
37fbe55eea
@ -30,12 +30,30 @@ static const struct mapping_backend *backend;
|
||||
*/
|
||||
static bool init_group_mapping(void)
|
||||
{
|
||||
const char *backend_string;
|
||||
|
||||
if (backend != NULL) {
|
||||
/* already initialised */
|
||||
return True;
|
||||
}
|
||||
|
||||
backend = groupdb_ldb_init();
|
||||
|
||||
/*
|
||||
* default to using the ldb backend. This parameter should
|
||||
* disappear in future versions of Samba3.
|
||||
*
|
||||
* But it's needed for cluster setups, because it's
|
||||
* not yet possible to distribute a ldb inside a cluster.
|
||||
*/
|
||||
backend_string = lp_parm_const_string(-1, "groupdb", "backend", "ldb");
|
||||
|
||||
if (strcmp(backend_string, "ldb") == 0) {
|
||||
backend = groupdb_ldb_init();
|
||||
} else if (strcmp(backend_string, "tdb") == 0) {
|
||||
backend = groupdb_tdb_init();
|
||||
} else {
|
||||
DEBUG(0,("Unknown groupdb backend '%s'\n", backend_string));
|
||||
smb_panic("Unknown groupdb backend");
|
||||
}
|
||||
|
||||
return backend != NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user