summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-20 21:01:27 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-20 21:01:27 +0100
commit87ddd5a807298348c95ce5cb720fd9cd87618953 (patch)
tree0ac067ff01c12d57a1105d0f79a144674605e540 /source4/dsdb/samdb/ldb_modules
parentbd7647f0f90c8306fb5868e88e6d46bdb7dfef62 (diff)
downloadsamba-87ddd5a807298348c95ce5cb720fd9cd87618953.tar.gz
samba-87ddd5a807298348c95ce5cb720fd9cd87618953.tar.bz2
samba-87ddd5a807298348c95ce5cb720fd9cd87618953.zip
s4:samldb LDB module - objectclass trigger - reorder template attributes
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index 338b13110f..0bf72473dd 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -829,10 +829,11 @@ static int samldb_objectclass_trigger(struct samldb_ctx *ac)
if (strcmp(ac->type, "user") == 0) {
/* Step 1.2: Default values */
- tempstr = talloc_asprintf(ac->msg, "%d", UF_NORMAL_ACCOUNT);
- if (tempstr == NULL) return ldb_operr(ldb);
ret = samdb_find_or_add_attribute(ldb, ac->msg,
- "userAccountControl", tempstr);
+ "accountExpires", "9223372036854775807");
+ if (ret != LDB_SUCCESS) return ret;
+ ret = samdb_find_or_add_attribute(ldb, ac->msg,
+ "badPasswordTime", "0");
if (ret != LDB_SUCCESS) return ret;
ret = samdb_find_or_add_attribute(ldb, ac->msg,
"badPwdCount", "0");
@@ -844,22 +845,22 @@ static int samldb_objectclass_trigger(struct samldb_ctx *ac)
"countryCode", "0");
if (ret != LDB_SUCCESS) return ret;
ret = samdb_find_or_add_attribute(ldb, ac->msg,
- "badPasswordTime", "0");
- if (ret != LDB_SUCCESS) return ret;
- ret = samdb_find_or_add_attribute(ldb, ac->msg,
"lastLogoff", "0");
if (ret != LDB_SUCCESS) return ret;
ret = samdb_find_or_add_attribute(ldb, ac->msg,
"lastLogon", "0");
if (ret != LDB_SUCCESS) return ret;
ret = samdb_find_or_add_attribute(ldb, ac->msg,
- "pwdLastSet", "0");
+ "logonCount", "0");
if (ret != LDB_SUCCESS) return ret;
ret = samdb_find_or_add_attribute(ldb, ac->msg,
- "accountExpires", "9223372036854775807");
+ "pwdLastSet", "0");
if (ret != LDB_SUCCESS) return ret;
+
+ tempstr = talloc_asprintf(ac->msg, "%d", UF_NORMAL_ACCOUNT);
+ if (tempstr == NULL) return ldb_operr(ldb);
ret = samdb_find_or_add_attribute(ldb, ac->msg,
- "logonCount", "0");
+ "userAccountControl", tempstr);
if (ret != LDB_SUCCESS) return ret;
el = ldb_msg_find_element(ac->msg, "userAccountControl");