From 5d08309204e475e85250a34ff7986c896e8c3c01 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 11 Jan 2010 20:17:53 +0100 Subject: s4:dsdb/common: let samdb_msg_add_uint() call samdb_msg_add_int() This is important as LDAP servers always play with int32 values and we have to encode 0x80000000 as "-2147483648" instead of "2147483648". metze --- source4/dsdb/common/util.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source4/dsdb/common') diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index 3f222d27d7..7d3f460c90 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -851,8 +851,7 @@ int samdb_msg_add_int(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct l int samdb_msg_add_uint(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct ldb_message *msg, const char *attr_name, uint_t v) { - const char *s = talloc_asprintf(mem_ctx, "%u", v); - return samdb_msg_add_string(sam_ldb, mem_ctx, msg, attr_name, s); + return samdb_msg_add_int(sam_ldb, mem_ctx, msg, attr_name, (int)v); } /* -- cgit