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

Re: [virt-tools-list] [PATCH] Fix regex matching for OS media



On Thu, Feb 23, 2012 at 1:10 PM, Daniel P. Berrange <berrange redhat com> wrote:
> From: "Daniel P. Berrange" <berrange redhat com>
>
> The current regex match rule is
>
>   If pattern is NULL and string is NULL
>      -> accept media
>   else if pattern is NULL or string is NULL
>      -> reject media
>   else
>      -> do regex compare
>
> The regex match rules ought to be
>
>   If pattern is NULL
>       -> accept media
>   Else if string is NULL
>       -> reject media
>   else
>       -> do regex compare
>
> The idea is that if the Osinfo database pattern is NULL, then
> regardless of whether the string is NULL or not, then we should
> allow that match. In effect a pattern == NULL, should be treated
> as equivalent to a regex ".*"

Sounds correct to me, ACK!

-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124


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