Re: [PATCH 1/2] qemuFirmwareFetchConfigs: Fix check for @privileged

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

 



On Wed, 2019-03-13 at 11:08 +0100, Michal Privoznik wrote:
> The qemuFirmwareFetchConfigs() function is supposed to fetch all
> firmware descriptions from paths defined by firmware.json
> specification. This includes user's $HOME directory. However, it
> was agreed that if libvirtd is running as privileged user then
> his $HOME is ignored (thus $HOME is included in the search only
> for regular users). Well, I got the condition wrong - it should
> have been reversed.
> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  src/qemu/qemu_firmware.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c
> index b423ab10e4..4ce010caaa 100644
> --- a/src/qemu/qemu_firmware.c
> +++ b/src/qemu/qemu_firmware.c
> @@ -974,7 +974,7 @@ qemuFirmwareFetchConfigs(char ***firmwares,
>  
>      *firmwares = NULL;
>  
> -    if (privileged) {
> +    if (!privileged) {
>          /* This is a slight divergence from the specification.
>           * Since the system daemon runs as root, it doesn't make
>           * much sense to parse files in root's home directory. It

How about moving the comment block right before the condition? That
would make it IMHO more obvious what part of the code it refers to.

Either way,

  Reviewed-by: Andrea Bolognani <abologna@xxxxxxxxxx>

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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