diff options
author | Wilco Baan Hofman <wilco@baanhofman.nl> | 2010-03-28 16:46:30 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-03-29 18:44:00 +0200 |
commit | b1c70d49c9f8e99997fe3c9228e92db5e6ad3ad4 (patch) | |
tree | 6238541dcd2625f1e4e01757fa5e04da99ffa65d /source4/lib | |
parent | cb670f366cdc7d3dd457bd40fc37349c4484b54b (diff) | |
download | samba-b1c70d49c9f8e99997fe3c9228e92db5e6ad3ad4.tar.gz samba-b1c70d49c9f8e99997fe3c9228e92db5e6ad3ad4.tar.bz2 samba-b1c70d49c9f8e99997fe3c9228e92db5e6ad3ad4.zip |
Revert "s4:registry - util.c - treat unsupported and binary values as the same in the conversion functions"
This reverts commit cc3eec1681bb6d614e688f51e48bd76f6d513e67.
Conflicts:
source4/lib/registry/util.c
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/registry/util.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/source4/lib/registry/util.c b/source4/lib/registry/util.c index 35d2025411..2b96797adc 100644 --- a/source4/lib/registry/util.c +++ b/source4/lib/registry/util.c @@ -84,6 +84,9 @@ _PUBLIC_ char *reg_val_data_string(TALLOC_CTX *mem_ctx, NULL, false); } break; + case REG_BINARY: + ret = data_blob_hex_string_upper(mem_ctx, &data); + break; case REG_DWORD: case REG_DWORD_BIG_ENDIAN: if (data.length == sizeof(uint32_t)) { @@ -97,9 +100,12 @@ _PUBLIC_ char *reg_val_data_string(TALLOC_CTX *mem_ctx, BVAL(data.data, 0)); } break; - case REG_BINARY: + case REG_MULTI_SZ: + /* FIXME: We don't support this yet */ + break; default: - ret = data_blob_hex_string_upper(mem_ctx, &data); + /* FIXME */ + /* Other datatypes aren't supported -> return "NULL" */ break; } @@ -154,7 +160,10 @@ _PUBLIC_ bool reg_string_to_val(TALLOC_CTX *mem_ctx, (void **)&data->data, &data->length, false); break; - case REG_DWORD: + case REG_BINARY: + *data = strhex_to_data_blob(mem_ctx, data_str); + break; + case REG_DWORD: { case REG_DWORD_BIG_ENDIAN: { uint32_t tmp = strtol(data_str, NULL, 0); *data = data_blob_talloc(mem_ctx, NULL, sizeof(uint32_t)); @@ -169,10 +178,13 @@ _PUBLIC_ bool reg_string_to_val(TALLOC_CTX *mem_ctx, SBVAL(data->data, 0, tmp); } break; - case REG_BINARY: + case REG_MULTI_SZ: + /* FIXME: We don't support this yet */ + return false; default: - *data = strhex_to_data_blob(mem_ctx, data_str); - break; + /* FIXME */ + /* Other datatypes aren't supported -> return no success */ + return false; } return true; } |