1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

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
This commit is contained in:
Stefan Metzmacher 2010-01-11 20:17:53 +01:00
parent 2d7ad938d0
commit 5d08309204

View File

@ -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);
}
/*