import libosinfo-1.9.0-4.el9
This commit is contained in:
parent
66de357f83
commit
bc6e48f503
45
SOURCES/0001-loader-add-check-for-unknown-file-type.patch
Normal file
45
SOURCES/0001-loader-add-check-for-unknown-file-type.patch
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
From d3b1587f7b77b630bae8ab3f4760eda69bd7fe66 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Victor Toso <victortoso@redhat.com>
|
||||||
|
Date: Fri, 26 Nov 2021 17:36:09 +0100
|
||||||
|
Subject: [PATCH 1/1] loader: add check for unknown file type
|
||||||
|
|
||||||
|
So we can provide a meaningful error message in case the provided path
|
||||||
|
is not accessible to running process.
|
||||||
|
|
||||||
|
e.g: running HOME=/root osinfo-query os we would get
|
||||||
|
`Error loading OS data: Unexpected file type`
|
||||||
|
and now we get
|
||||||
|
`Error loading OS data: Can't read path /root/.config/osinfo`
|
||||||
|
|
||||||
|
This error was first hit with v2v [0] that was leaking $USER and $HOME
|
||||||
|
of root user when osinfo-query as vsdm user with `sudo -c vdsm`. The
|
||||||
|
example above is a simple way to show lack of permision of
|
||||||
|
osinfo-query to read the root's $HOME.
|
||||||
|
|
||||||
|
[0] https://bugzilla.redhat.com/show_bug.cgi?id=1901423
|
||||||
|
|
||||||
|
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1902720
|
||||||
|
Signed-off-by: Victor Toso <victortoso@redhat.com>
|
||||||
|
---
|
||||||
|
osinfo/osinfo_loader.c | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c
|
||||||
|
index 3f04fa5..96ca6ee 100644
|
||||||
|
--- a/osinfo/osinfo_loader.c
|
||||||
|
+++ b/osinfo/osinfo_loader.c
|
||||||
|
@@ -2374,6 +2374,11 @@ static void osinfo_loader_find_files(OsinfoLoader *loader,
|
||||||
|
}
|
||||||
|
g_object_unref(ents);
|
||||||
|
g_list_free(children);
|
||||||
|
+ } else if (type == G_FILE_TYPE_UNKNOWN) {
|
||||||
|
+ g_autofree gchar *path = g_file_get_path(file);
|
||||||
|
+ g_autofree gchar *msg = g_strdup_printf("Can't read path %s", path);
|
||||||
|
+ OSINFO_LOADER_SET_ERROR(&error, msg);
|
||||||
|
+ g_propagate_error(err, error);
|
||||||
|
} else {
|
||||||
|
OSINFO_LOADER_SET_ERROR(&error, "Unexpected file type");
|
||||||
|
g_propagate_error(err, error);
|
||||||
|
--
|
||||||
|
2.33.1
|
||||||
|
|
@ -3,12 +3,13 @@
|
|||||||
Summary: A library for managing OS information for virtualization
|
Summary: A library for managing OS information for virtualization
|
||||||
Name: libosinfo
|
Name: libosinfo
|
||||||
Version: 1.9.0
|
Version: 1.9.0
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Source: https://releases.pagure.io/%{name}/%{name}-%{version}.tar.xz
|
Source: https://releases.pagure.io/%{name}/%{name}-%{version}.tar.xz
|
||||||
URL: https://libosinfo.org/
|
URL: https://libosinfo.org/
|
||||||
|
|
||||||
### Patches ###
|
### Patches ###
|
||||||
|
Patch0001: 0001-loader-add-check-for-unknown-file-type.patch
|
||||||
|
|
||||||
BuildRequires: meson
|
BuildRequires: meson
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
@ -96,6 +97,10 @@ Libraries, includes, etc. to compile with the libosinfo library
|
|||||||
%{_datadir}/vala/vapi/libosinfo-1.0.vapi
|
%{_datadir}/vala/vapi/libosinfo-1.0.vapi
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Dec 01 2021 Victor Toso <victortoso@redhat.com> - 1.9.0-4
|
||||||
|
- Improve error message on failure to access database due permission
|
||||||
|
Related: rhbz#1942431
|
||||||
|
|
||||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.9.0-3
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.9.0-3
|
||||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||||
Related: rhbz#1991688
|
Related: rhbz#1991688
|
||||||
@ -103,7 +108,7 @@ Libraries, includes, etc. to compile with the libosinfo library
|
|||||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.9.0-2
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.9.0-2
|
||||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||||
|
|
||||||
* Wed Feb 02 2021 Fabiano Fidêncio <fidencio@redhat.com> - 1.9.0-1
|
* Tue Feb 02 2021 Fabiano Fidêncio <fidencio@redhat.com> - 1.9.0-1
|
||||||
- Update to 1.9.0 release
|
- Update to 1.9.0 release
|
||||||
|
|
||||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-6
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-6
|
||||||
|
Loading…
Reference in New Issue
Block a user