Re: [PATCH] util: audit: Fix the error code when kernel lacks audit support

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

 



On Tue, Jan 15, 2019 at 16:08:24 +0100, Erik Skultety wrote:
> When commit 4199c2f221c tweaked the error path of virAuditOpen it used
> VIR_FROM_THIS as the error code to virReportError.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1596119
> 
> Signed-off-by: Erik Skultety <eskultet@xxxxxxxxxx>
> ---
>  src/util/viraudit.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/util/viraudit.c b/src/util/viraudit.c
> index a02e5b36fd..d04343a542 100644
> --- a/src/util/viraudit.c
> +++ b/src/util/viraudit.c
> @@ -66,7 +66,8 @@ int virAuditOpen(unsigned int audit_level ATTRIBUTE_UNUSED)
>              if (audit_level < 2)
>                  VIR_INFO("Audit is not supported by the kernel");
>              else
> -                virReportError(VIR_FROM_THIS, "%s", _("Audit is not supported by the kernel"));
> +                virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
> +                               _("Audit is not supported by the kernel"));

Isn't "VIR_ERR_CONFIG_UNSUPPORTED" more appropriate as it's an option
which is set by libvirtd.conf?

Attachment: signature.asc
Description: PGP signature

--
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