summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-01-24 18:36:49 +1100
committerAndrew Bartlett <abartlet@samba.org>2012-01-24 18:36:49 +1100
commit1a9ee7cbd575f3865a2cd8dfe35e3f89ebdec073 (patch)
tree0e1dc32ec476f5662721c0141ae0989d11f7ecc2
parent1f0298dd1b1a939cb215e7b474178b217f8347f4 (diff)
downloadsamba-1a9ee7cbd575f3865a2cd8dfe35e3f89ebdec073.tar.gz
samba-1a9ee7cbd575f3865a2cd8dfe35e3f89ebdec073.tar.bz2
samba-1a9ee7cbd575f3865a2cd8dfe35e3f89ebdec073.zip
dsdb: Allow DSDB_CONTROL_PASSWORD_BYPASS_LAST_SET_OID to be specified as a flag
-rw-r--r--source4/dsdb/common/util.c7
-rw-r--r--source4/dsdb/common/util.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index 38391a9998..814faa607c 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -3725,6 +3725,13 @@ int dsdb_request_add_controls(struct ldb_request *req, uint32_t dsdb_flags)
}
}
+ if (dsdb_flags & DSDB_PASSWORD_BYPASS_LAST_SET) {
+ ret = ldb_request_add_control(req, DSDB_CONTROL_PASSWORD_BYPASS_LAST_SET_OID, true, NULL);
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+ }
+
if (dsdb_flags & DSDB_MODIFY_PARTIAL_REPLICA) {
ret = ldb_request_add_control(req, DSDB_CONTROL_PARTIAL_REPLICA, false, NULL);
if (ret != LDB_SUCCESS) {
diff --git a/source4/dsdb/common/util.h b/source4/dsdb/common/util.h
index b2f7aa5b32..5ec19fb776 100644
--- a/source4/dsdb/common/util.h
+++ b/source4/dsdb/common/util.h
@@ -38,6 +38,7 @@
#define DSDB_BYPASS_PASSWORD_HASH 0x1000
#define DSDB_SEARCH_NO_GLOBAL_CATALOG 0x2000
#define DSDB_MODIFY_PARTIAL_REPLICA 0x4000
+#define DSDB_PASSWORD_BYPASS_LAST_SET 0x8000
bool is_attr_in_list(const char * const * attrs, const char *attr);