diff options
Diffstat (limited to 'source3/registry/reg_objects.c')
-rw-r--r-- | source3/registry/reg_objects.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c index 6336d00657..baa3000eb6 100644 --- a/source3/registry/reg_objects.c +++ b/source3/registry/reg_objects.c @@ -407,6 +407,24 @@ bool regval_ctr_value_exists(struct regval_ctr *ctr, const char *value) return False; } +/** + * Get a value by its name + */ +struct regval_blob *regval_ctr_value_byname(struct regval_ctr *ctr, + const char *value) +{ + int i; + + for (i = 0; i < ctr->num_values; i++) { + if (strequal(ctr->values[i]->valuename, value)) { + return ctr->values[i]; + } + } + + return NULL; +} + + /*********************************************************************** * compose a struct regval_blob from input data **********************************************************************/ |