Re: [PATCH] Fix regex matching for OS media

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

 



On Thu, Feb 23, 2012 at 1:10 PM, Daniel P. Berrange <berrange@xxxxxxxxxx> wrote:
> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
>
> 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


[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux