{
struct GUID guid;
NTSTATUS status;
- enum ndr_err_code ndr_err;
status = GUID_from_data_blob(in, &guid);
if (!NT_STATUS_IS_OK(status)) {
return -1;
}
- ndr_err = ndr_push_struct_blob(out, mem_ctx, NULL, &guid,
- (ndr_push_flags_fn_t)ndr_push_GUID);
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ status = GUID_to_ndr_blob(&guid, mem_ctx, out);
+ if (!NT_STATUS_IS_OK(status)) {
return -1;
}
return 0;
/* 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];
}
}
+ 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,