s4-registry: fixed byte order assumptions
[ira/wip.git] / source4 / lib / registry / ldb.c
index 033fdcb780cc3c295876023addeb4665c3cae0a0..d70489ac03a53f4ebd491de1d370d3d90f33de25 100644 (file)
@@ -80,7 +80,8 @@ static void reg_ldb_unpack_value(TALLOC_CTX *mem_ctx,
 
        case REG_DWORD: {
                uint32_t tmp = strtoul((char *)val->data, NULL, 0);
 
        case REG_DWORD: {
                uint32_t tmp = strtoul((char *)val->data, NULL, 0);
-               *data = data_blob_talloc(mem_ctx, &tmp, 4);
+               *data = data_blob_talloc(mem_ctx, NULL, 4);
+               SIVAL(data->data, 0, tmp);
                }
                break;
 
                }
                break;