summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-10 14:32:47 +1100
committerAndrew Tridgell <tridge@samba.org>2009-12-10 17:51:29 +1100
commit215cc5a9edfbe9b50440266fba72e8f91c64066b (patch)
tree278d868f27739c7304302170377a8aa1010923e8 /source4/lib/ldb/common
parent982228605f3bc77901467f1673bd1385808423e0 (diff)
downloadsamba-215cc5a9edfbe9b50440266fba72e8f91c64066b.tar.gz
samba-215cc5a9edfbe9b50440266fba72e8f91c64066b.tar.bz2
samba-215cc5a9edfbe9b50440266fba72e8f91c64066b.zip
s4-ldb: use GUID_to_ndr_blob()
Diffstat (limited to 'source4/lib/ldb/common')
-rw-r--r--source4/lib/ldb/common/ldb_dn.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/lib/ldb/common/ldb_dn.c b/source4/lib/ldb/common/ldb_dn.c
index 3721fa7333..63cec89953 100644
--- a/source4/lib/ldb/common/ldb_dn.c
+++ b/source4/lib/ldb/common/ldb_dn.c
@@ -232,7 +232,7 @@ static int ldb_dn_escape_internal(char *dst, const char *src, int len)
/* any others get \XX form */
unsigned char v;
const char *hexbytes = "0123456789ABCDEF";
- v = *(unsigned char *)p;
+ v = *(const unsigned char *)p;
*d++ = '\\';
*d++ = hexbytes[v>>4];
*d++ = hexbytes[v&0xF];
@@ -1901,6 +1901,11 @@ int ldb_dn_set_extended_component(struct ldb_dn *dn,
}
}
+ if (val == NULL) {
+ /* removing a value that doesn't exist is not an error */
+ return LDB_SUCCESS;
+ }
+
p = dn->ext_components
= talloc_realloc(dn,
dn->ext_components,