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

2022-01-11 Thread Andrea Bolognani
On Tue, Jan 11, 2022 at 10:24:00AM +, Daniel P. Berrangé wrote: > On Tue, Jan 11, 2022 at 10:18:23AM +, Andrea Bolognani wrote: > > On Tue, Jan 11, 2022 at 09:59:06AM +, Daniel P. Berrangé wrote: > > > Why do we need a fallback ? If someone has put 'dnsmasq' in $PATH > > > without the

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

2022-01-11 Thread Daniel P . Berrangé
On Tue, Jan 11, 2022 at 10:18:23AM +, Andrea Bolognani wrote: > On Tue, Jan 11, 2022 at 09:59:06AM +, Daniel P. Berrangé wrote: > > On Tue, Jan 11, 2022 at 09:28:45AM +0100, Michal Prívozník wrote: > > > Thanks, but as I was looking through virFindFileInPath() I've noticed > > > that if

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

2022-01-11 Thread Andrea Bolognani
On Tue, Jan 11, 2022 at 09:59:06AM +, Daniel P. Berrangé wrote: > On Tue, Jan 11, 2022 at 09:28:45AM +0100, Michal Prívozník wrote: > > Thanks, but as I was looking through virFindFileInPath() I've noticed > > that if the file exists but is not executable then NULL is returned, so > > we will

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

2022-01-11 Thread Daniel P . Berrangé
On Tue, Jan 11, 2022 at 09:28:45AM +0100, Michal Prívozník wrote: > On 1/10/22 18:41, Andrea Bolognani wrote: > > 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

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

2022-01-11 Thread Andrea Bolognani
On Tue, Jan 11, 2022 at 09:28:45AM +0100, Michal Prívozník wrote: > Thanks, but as I was looking through virFindFileInPath() I've noticed > that if the file exists but is not executable then NULL is returned, so > we will need a fallback case. Right. But considering that

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

2022-01-11 Thread Michal Prívozník
On 1/10/22 18:41, Andrea Bolognani wrote: > 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

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

2022-01-10 Thread Andrea Bolognani
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

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

2022-01-10 Thread Michal Privoznik
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