[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 04/11] storage: Introduce XMLs to use secret object for pool auth

On 06/20/2013 02:38 AM, Osier Yang wrote:
> On 06/06/13 23:34, John Ferlan wrote:
>> On 05/28/2013 02:39 AM, Osier Yang wrote:

>>> index aff1393..b52cdc4 100644
>>> --- a/src/conf/storage_conf.h
>>> +++ b/src/conf/storage_conf.h
>>> @@ -153,11 +153,20 @@ struct _virStoragePoolAuthSecret {
>>>       bool uuidUsable;
>>>   };
>>>   +enum virStoragePoolAuthChapType {
>> I think you need a VIR_STORAGE_POOL_AUTH_CHAP_NONE = 0, here
> I see no need, since it must be either PASSWORD or SECRET,
> otherwise there is error, it's mandatory to have either a 'passwd'
> or 'secret'.
> Osier

It's been a bit since I reviewed, but I think the point was given the
context of the code *as written*, then NONE could be defined and if set,
sure would be an error.  The order of the definitions and the "default"
value of 0 (zero) is important since all allocations result in fields
being initialized to zero. Thus the assumption 'could be' in places in
the code that VIR_STORAGE_POOL_AUTH_CHAP_PLAIN_PASSWORD is the value for
auth->type.  If you have a NONE=0 definition, then code decisions can be
made based upon that...


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]