[libvirt] [PATCH 14/10] secret: Introduce virSecretObjGetValue and virSecretObjGetValueSize

Cole Robinson crobinso at redhat.com
Mon Apr 18 22:22:29 UTC 2016


On 03/08/2016 12:39 PM, John Ferlan wrote:
> Introduce the final accessor's to _virSecretObject data and move the
> structure from secret_conf.h to secret_conf.c
> 
> The virSecretObjSetValue logic will handle setting both the secret
> value and the value_size. Some slight adjustments to the error path
> over what was in secretSetValue were made.
> 
> Additionally, a slight logic change in secretGetValue where we'll
> check for the internalFlags and error out before checking for
> and erroring out for a NULL secret->value. That way, it won't be
> obvious to anyone that the secret value wasn't set rather they'll
> just know they cannot get the secret value since it's private.
> 
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
>  src/conf/secret_conf.c     | 84 ++++++++++++++++++++++++++++++++++++++++++++++
>  src/conf/secret_conf.h     | 17 +++++-----
>  src/libvirt_private.syms   |  4 +++
>  src/secret/secret_driver.c | 50 ++++-----------------------
>  4 files changed, 104 insertions(+), 51 deletions(-)
> 
> diff --git a/src/conf/secret_conf.c b/src/conf/secret_conf.c
> index 0410328..4d0cb9c 100644
> --- a/src/conf/secret_conf.c
> +++ b/src/conf/secret_conf.c

...

> +
> +
> +int
> +virSecretObjSetValue(virSecretObjPtr secret,
> +                     const unsigned char *value,
> +                     size_t value_size)
> +{

...

> +
> +    return  0;

Weird spacing here

ACK otherwise

- Cole




More information about the libvir-list mailing list