diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-01-11 20:00:43 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-01-13 14:51:59 +0100 |
commit | 2d7ad938d0b9345af920d396d5098ee52e900f2d (patch) | |
tree | 91b3544697d39b06d766d000c742c95b37a12f88 /source4 | |
parent | 8d4b913ce24632eca2a6fc08ef8f553eaa9afa77 (diff) | |
download | samba-2d7ad938d0b9345af920d396d5098ee52e900f2d.tar.gz samba-2d7ad938d0b9345af920d396d5098ee52e900f2d.tar.bz2 samba-2d7ad938d0b9345af920d396d5098ee52e900f2d.zip |
s4:dsdb/common: let samdb_msg_add_uint64() call samdb_msg_add_int64()
This is important as LDAP servers always play with int64 values
and we have to encode 0x8000000000000000LL as "-9223372036854775808"
instead of "9223372036854775808".
metze
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/common/util.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index 6147940e3b..3f222d27d7 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -871,8 +871,7 @@ int samdb_msg_add_int64(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct int samdb_msg_add_uint64(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct ldb_message *msg, const char *attr_name, uint64_t v) { - const char *s = talloc_asprintf(mem_ctx, "%llu", (unsigned long long)v); - return samdb_msg_add_string(sam_ldb, mem_ctx, msg, attr_name, s); + return samdb_msg_add_int64(sam_ldb, mem_ctx, msg, attr_name, (int64_t)v); } /* |