git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d7ad93
)
s4:dsdb/common: let samdb_msg_add_uint() call samdb_msg_add_int()
author
Stefan Metzmacher
<metze@samba.org>
Mon, 11 Jan 2010 19:17:53 +0000
(20:17 +0100)
committer
Stefan Metzmacher
<metze@samba.org>
Wed, 13 Jan 2010 13:51:59 +0000
(14:51 +0100)
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
patch
|
blob
|
history
diff --git
a/source4/dsdb/common/util.c
b/source4/dsdb/common/util.c
index 3f222d27d7cf98cd35889a3c11785e135dd1be1e..7d3f460c9068a16165b9aafbac8135c5653d8a98 100644
(file)
--- 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);
}
/*