summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-01-11 20:17:53 +0100
committerStefan Metzmacher <metze@samba.org>2010-01-13 14:51:59 +0100
commit5d08309204e475e85250a34ff7986c896e8c3c01 (patch)
treee881773538e14d38baa44684ca5a9ae2813d41c4 /source4/dsdb
parent2d7ad938d0b9345af920d396d5098ee52e900f2d (diff)
downloadsamba-5d08309204e475e85250a34ff7986c896e8c3c01.tar.gz
samba-5d08309204e475e85250a34ff7986c896e8c3c01.tar.bz2
samba-5d08309204e475e85250a34ff7986c896e8c3c01.zip
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
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/common/util.c3
1 files changed, 1 insertions, 2 deletions
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);
}
/*