summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2010-10-14 17:56:23 +0400
committerMatthieu Patou <mat@matws.net>2010-10-15 11:34:24 +0400
commit34f12d541b0bb2e7d931968b2079dfb7ba84d692 (patch)
tree0e38ece15ffd97a74c33106ccef8e0fbe34a69a8
parentf794563267ca26b62d844d87b5a4fa3668fb803c (diff)
downloadsamba-34f12d541b0bb2e7d931968b2079dfb7ba84d692.tar.gz
samba-34f12d541b0bb2e7d931968b2079dfb7ba84d692.tar.bz2
samba-34f12d541b0bb2e7d931968b2079dfb7ba84d692.zip
s4 dsdb: fix sign problem on PPC and x86
In LDAP we used signed intege and groups have the highest bit set (ie. 0x80000002). So it will result with values that are > 2^31 when these value are used on some plateforms (x86 and PPC 64bits in this case) it causes problem with strtol.
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index 400ae81114..ff110b7402 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -793,7 +793,7 @@ static int samldb_objectclass_trigger(struct samldb_ctx *ac)
/* Step 1.2: Default values */
ret = samdb_find_or_add_attribute(ldb, ac->msg,
"userAccountControl",
- talloc_asprintf(ac->msg, "%u", UF_NORMAL_ACCOUNT));
+ talloc_asprintf(ac->msg, "%d", UF_NORMAL_ACCOUNT));
if (ret != LDB_SUCCESS) return ret;
ret = samdb_find_or_add_attribute(ldb, ac->msg,
"badPwdCount", "0");
@@ -896,7 +896,7 @@ static int samldb_objectclass_trigger(struct samldb_ctx *ac)
/* Step 2.2: Default values */
ret = samdb_find_or_add_attribute(ldb, ac->msg,
"groupType",
- talloc_asprintf(ac->msg, "%u", GTYPE_SECURITY_GLOBAL_GROUP));
+ talloc_asprintf(ac->msg, "%d", GTYPE_SECURITY_GLOBAL_GROUP));
if (ret != LDB_SUCCESS) return ret;
/* Step 2.3: "groupType" -> "sAMAccountType" */