diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/common/util.c | 8 | ||||
-rw-r--r-- | source4/dsdb/common/util.h | 1 |
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); |