Re: [PATCH 2/3] virdnsmasq: Lookup DNSMASQ in PATH

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

 



On Mon, Jan 10, 2022 at 04:44:55PM +0100, Michal Privoznik wrote:
> While it's true that our virCommand subsystem is happy with
> non-absolute paths, the dnsmasq capability code is not. For
> instance, it does call stat() over the binary to learn its mtime
> (and thus decide whether capabilities need to be fetched again or
> not).
>
> Therefore, when constructing the capabilities structure look up
> the binary path. If DNSMASQ already contains an absolute path
> then it is returned (and virFindFileInPath() is a NOP).

Saying that virFindFileInPath() is a NOP is not quite correct: if you
pass an absolute path, it will return a copy. So I'd rewrite the
above as

  If DNSMASQ already contains an absolute path then
  virFindFileInPath() will simply return a copy.

Reviewed-by: Andrea Bolognani <abologna@xxxxxxxxxx>

-- 
Andrea Bolognani / Red Hat / Virtualization




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux