summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-08-11 16:14:36 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-08-13 12:30:48 +1000
commitc5e41a21dd2dad9b43b40b38f75cea0da67c2cce (patch)
tree6a4ab50d722a445d30e67a91d10f6cd491f994ad /source4/dsdb
parent65e12c05012b714dc1060650419f72266bf5ad07 (diff)
downloadsamba-c5e41a21dd2dad9b43b40b38f75cea0da67c2cce.tar.gz
samba-c5e41a21dd2dad9b43b40b38f75cea0da67c2cce.tar.bz2
samba-c5e41a21dd2dad9b43b40b38f75cea0da67c2cce.zip
s4-dsdb Add flag to set DSDB_BYPASS_PASSWORD_HASH control
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/common/util.c8
-rw-r--r--source4/dsdb/common/util.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index 3b287e3635..22f092c127 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -3658,6 +3658,14 @@ int dsdb_request_add_controls(struct ldb_request *req, uint32_t dsdb_flags)
}
}
+ /* This is a special control to bypass the password_hash module for use in pdb_samba4 for Samba3 upgrades */
+ if (dsdb_flags & DSDB_BYPASS_PASSWORD_HASH) {
+ ret = ldb_request_add_control(req, DSDB_CONTROL_BYPASS_PASSWORD_HASH_OID, true, NULL);
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+ }
+
return LDB_SUCCESS;
}
diff --git a/source4/dsdb/common/util.h b/source4/dsdb/common/util.h
index afcb3dc7e7..0140f2956e 100644
--- a/source4/dsdb/common/util.h
+++ b/source4/dsdb/common/util.h
@@ -35,6 +35,7 @@
#define DSDB_SEARCH_ONE_ONLY 0x0200 /* give an error unless 1 record */
#define DSDB_SEARCH_SHOW_RECYCLED 0x0400
#define DSDB_PROVISION 0x0800
+#define DSDB_BYPASS_PASSWORD_HASH 0x1000
bool is_attr_in_list(const char * const * attrs, const char *attr);