[SCM] Samba Shared Repository - branch master updated
Matthias Dieter Wallnöfer
mdw at samba.org
Thu Oct 7 01:41:02 MDT 2010
The branch, master has been updated
via ea36245 s4:dsdb/common/util_samr.c - use an LDB constant for result checking
via c9da312 s4:dsdb/common/util.c - provide message set functions for integer types
from 321bb40 script: improvements to bisect-test.py
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit ea36245ebeb26e5bc98983c817fb023cd8a8d50f
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Wed Oct 6 20:45:36 2010 +0200
s4:dsdb/common/util_samr.c - use an LDB constant for result checking
Autobuild-User: Matthias Dieter Wallnöfer <mdw at samba.org>
Autobuild-Date: Thu Oct 7 07:40:31 UTC 2010 on sn-devel-104
commit c9da3122c845054e93f25c723f4dd9791bfbd853
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Wed Oct 6 19:11:58 2010 +0200
s4:dsdb/common/util.c - provide message set functions for integer types
They will be used by the samldb LDB module
-----------------------------------------------------------------------
Summary of changes:
source4/dsdb/common/util.c | 31 +++++++++++++++++++++++++++++++
source4/dsdb/common/util_samr.c | 2 +-
2 files changed, 32 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index faf2fb5..7121521 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -1102,6 +1102,37 @@ int samdb_msg_set_string(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struc
}
/*
+ * sets a signed integer in a message
+ */
+int samdb_msg_set_int(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx,
+ struct ldb_message *msg, const char *attr_name, int v)
+{
+ struct ldb_message_element *el;
+
+ el = ldb_msg_find_element(msg, attr_name);
+ if (el) {
+ el->num_values = 0;
+ }
+ return samdb_msg_add_int(sam_ldb, mem_ctx, msg, attr_name, v);
+}
+
+/*
+ * sets an unsigned integer in a message
+ */
+int samdb_msg_set_uint(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx,
+ struct ldb_message *msg, const char *attr_name,
+ unsigned int v)
+{
+ struct ldb_message_element *el;
+
+ el = ldb_msg_find_element(msg, attr_name);
+ if (el) {
+ el->num_values = 0;
+ }
+ return samdb_msg_add_uint(sam_ldb, mem_ctx, msg, attr_name, v);
+}
+
+/*
* Handle ldb_request in transaction
*/
static int dsdb_autotransaction_request(struct ldb_context *sam_ldb,
diff --git a/source4/dsdb/common/util_samr.c b/source4/dsdb/common/util_samr.c
index dbf7194..85bfbfd 100644
--- a/source4/dsdb/common/util_samr.c
+++ b/source4/dsdb/common/util_samr.c
@@ -216,7 +216,7 @@ NTSTATUS dsdb_add_user(struct ldb_context *ldb,
if (samdb_msg_add_uint(ldb, tmp_ctx, msg,
"userAccountControl",
- user_account_control) != 0) {
+ user_account_control) != LDB_SUCCESS) {
ldb_transaction_cancel(ldb);
talloc_free(tmp_ctx);
return NT_STATUS_NO_MEMORY;
--
Samba Shared Repository
More information about the samba-cvs
mailing list