summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2014-03-28 15:37:19 +1300
committerAndrew Bartlett <abartlet@samba.org>2014-06-16 00:26:26 +0200
commitad533709e5f98230cc3f6b79afecf2c6e057a4b8 (patch)
treef453e9c0df4dde1da95ea9618bcc92e6499c7c7f
parentb359b0c160e6c13249a6226583dec9553874b232 (diff)
downloadsamba-ad533709e5f98230cc3f6b79afecf2c6e057a4b8.zip
samba-ad533709e5f98230cc3f6b79afecf2c6e057a4b8.tar.gz
samba-ad533709e5f98230cc3f6b79afecf2c6e057a4b8.tar.xz
s3-winbindd: Honour pdb_is_responsible_for_everything_else()
This allows us to avoid running idmap_init_default_domain() which gives an error in the default AD DC config. Andrew Bartlett Change-Id: I923bd941951f6a907e6fa1ad167e5218a01040ff Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
-rw-r--r--source3/winbindd/idmap.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/source3/winbindd/idmap.c b/source3/winbindd/idmap.c
index 97a34d4..674f54c 100644
--- a/source3/winbindd/idmap.c
+++ b/source3/winbindd/idmap.c
@@ -25,6 +25,7 @@
#include "winbindd.h"
#include "idmap.h"
#include "lib/util_sid_passdb.h"
+#include "passdb.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_IDMAP
@@ -330,14 +331,16 @@ static struct idmap_domain *idmap_passdb_domain(TALLOC_CTX *mem_ctx)
{
idmap_init();
- /*
- * Always init the default domain, we can't go without one
- */
- if (default_idmap_domain == NULL) {
- default_idmap_domain = idmap_init_default_domain(NULL);
- }
- if (default_idmap_domain == NULL) {
- return NULL;
+ if (!pdb_is_responsible_for_everything_else()) {
+ /*
+ * Always init the default domain, we can't go without one
+ */
+ if (default_idmap_domain == NULL) {
+ default_idmap_domain = idmap_init_default_domain(NULL);
+ }
+ if (default_idmap_domain == NULL) {
+ return NULL;
+ }
}
if (passdb_idmap_domain != NULL) {