[SCM] Samba Shared Repository - branch master updated

Matthias Dieter Wallnöfer mdw at samba.org
Thu Oct 14 02:27:01 MDT 2010


The branch, master has been updated
       via  9a3810f s4:samldb LDB module - attempt to fix integer handling on big-endian platforms
      from  3921d6f s4-waf: automatically remove stale C and header files

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 9a3810fbb234c4c2a401e6940643ee161e83bb4f
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Thu Oct 14 09:11:04 2010 +0200

    s4:samldb LDB module - attempt to fix integer handling on big-endian platforms
    
    And beside this it's also nicer to use standard LDB functions for type
    conversions.
    
    Autobuild-User: Matthias Dieter Wallnöfer <mdw at samba.org>
    Autobuild-Date: Thu Oct 14 08:26:53 UTC 2010 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 source4/dsdb/samdb/ldb_modules/samldb.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index 53099f0..385be49 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -828,8 +828,9 @@ static int samldb_objectclass_trigger(struct samldb_ctx *ac)
 			uint32_t user_account_control, account_type;
 
 			/* Step 1.3: "userAccountControl" -> "sAMAccountType" mapping */
-			user_account_control = strtoul((const char *)el->values[0].data,
-						       NULL, 0);
+			user_account_control = ldb_msg_find_attr_as_uint(ac->msg,
+									 "userAccountControl",
+									 0);
 
 			/* Temporary duplicate accounts aren't allowed */
 			if ((user_account_control & UF_TEMP_DUPLICATE_ACCOUNT) != 0) {
@@ -903,8 +904,8 @@ static int samldb_objectclass_trigger(struct samldb_ctx *ac)
 		if (el != NULL) {
 			uint32_t group_type, account_type;
 
-			group_type = strtoul((const char *)el->values[0].data,
-					     NULL, 0);
+			group_type = ldb_msg_find_attr_as_uint(ac->msg,
+							       "groupType", 0);
 
 			/* The creation of builtin groups requires the
 			 * RELAX control */
@@ -1308,7 +1309,7 @@ static int samldb_modify(struct ldb_module *module, struct ldb_request *req)
 
 		modified = true;
 
-		group_type = strtoul((const char *)el->values[0].data, NULL, 0);
+		group_type = ldb_msg_find_attr_as_uint(ac->msg, "groupType", 0);
 		old_group_type = samdb_search_uint(ldb, ac, 0, ac->msg->dn,
 						   "groupType", NULL);
 		if (old_group_type == 0) {
@@ -1390,8 +1391,9 @@ static int samldb_modify(struct ldb_module *module, struct ldb_request *req)
 
 		modified = true;
 
-		user_account_control = strtoul((const char *)el->values[0].data,
-			NULL, 0);
+		user_account_control = ldb_msg_find_attr_as_uint(ac->msg,
+								 "userAccountControl",
+								 0);
 
 		/* Temporary duplicate accounts aren't allowed */
 		if ((user_account_control & UF_TEMP_DUPLICATE_ACCOUNT) != 0) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list